linea21-externals
[ class tree: linea21-externals ] [ index: linea21-externals ] [ all elements ]

Class: awLine

Source Location: /class/system/artichow/php4/inc/Math.class.php

Class Overview

awShape
   |
   --awLine

Describe a line


Variables

Methods


Child classes:

awVector
A vector is a type of line The sense of the vector goes from $p1 to $p2.

Inherited Variables

Inherited Methods

Class: awShape

awShape::getStyle()
Return shape style
awShape::getThickness()
Return shape thickness
awShape::hide()
Hide the shape
awShape::isHidden()
Is the line hidden ?
awShape::setStyle()
Change shape style
awShape::setThickness()
Change shape thickness
awShape::show()
Show the shape

Class Details

[line 239]
Describe a line



[ Top ]


Class Variables

$origin =

[line 267]

The y-intercept value of the line (the p in y = mx + p)


Type:   mixed


[ Top ]

$p1 =

[line 246]

Line first point


Type:   mixed


[ Top ]

$p2 =

[line 253]

Line second point


Type:   mixed


[ Top ]

$slope =

[line 260]

The line slope (the m in y = mx + p)


Type:   mixed


[ Top ]



Class Methods


constructor awLine [line 277]

awLine awLine( [$p1 $p1 = NULL], [$p2 $p2 = NULL], [int $type = LINE_SOLID], [int $thickness = 1])

Build a new awline



Parameters:

int   $type   Style of line (default to solid)
int   $thickness   Line thickness (default to 1)
$p1   $p1   First point
$p2   $p2   Second point

[ Top ]

method build [line 293]

void build( int $x1, int $y1, int $x2, int $y2)

Build a line from 4 coords



Parameters:

int   $x1   Left position
int   $y1   Top position
int   $x2   Right position
int   $y2   Bottom position

[ Top ]

method calculateEquation [line 412]

void calculateEquation( )

Calculate the slope and y-intercept value of the line



[ Top ]

method calculateOrigin [line 393]

void calculateOrigin( )

Calculate the y-intercept value of the line



[ Top ]

method calculateSlope [line 379]

void calculateSlope( )

Calculate the line slope



[ Top ]

method getEquation [line 454]

array getEquation( )

Get the line equation



Tags:

return:  An array containing the slope and y-intercept value of the line


[ Top ]

method getLocation [line 359]

void getLocation( array 0)

Get line location



Parameters:

array   0   Line location

[ Top ]

method getOrigin [line 438]

float getOrigin( )

Get the line y-intercept value



[ Top ]

method getSize [line 368]

float getSize( )

Get the line size



[ Top ]

method getSlope [line 422]

float getSlope( )

Get the line slope value



[ Top ]

method getXFrom [line 468]

float getXFrom( float $y)

Return the x coordinate of a point on the line given its y coordinate.



Tags:

return:  The corresponding x coordinate


Parameters:

float   $y   The y coordinate of the Point

[ Top ]

method getYFrom [line 493]

float getYFrom( float $x)

Return the y coordinate of a point on the line given its x coordinate.



Tags:

return:  The corresponding y coordinate


Parameters:

float   $x   The x coordinate of the Point

[ Top ]

method isHorizontal [line 534]

bool isHorizontal( )

Test if the line is an horizontal line



[ Top ]

method isLeftToRight [line 575]

bool isLeftToRight( $polygon &$polygon)

Returns TRUE if the line is going all the way from the left side to the right side of the polygon surrounding box.



Parameters:

$polygon   &$polygon   Polygon A Polygon object

[ Top ]

method isOnBoxBottomSide [line 612]

void isOnBoxBottomSide( $point, $xMin, $xMax, $yMax)



Parameters:

   $point  
   $xMin  
   $xMax  
   $yMax  

[ Top ]

method isOnBoxLeftSide [line 626]

void isOnBoxLeftSide( $point, $yMin, $yMax, $xMin)



Parameters:

   $point  
   $yMin  
   $yMax  
   $xMin  

[ Top ]

method isOnBoxRightSide [line 640]

void isOnBoxRightSide( $point, $yMin, $yMax, $xMax)



Parameters:

   $point  
   $yMin  
   $yMax  
   $xMax  

[ Top ]

method isOnBoxTopSide [line 598]

void isOnBoxTopSide( $point, $xMin, $xMax, $yMin)



Parameters:

   $point  
   $xMin  
   $xMax  
   $yMin  

[ Top ]

method isPoint [line 516]

bool isPoint( )

Test if the line can be considered as a point



[ Top ]

method isTopToBottom [line 545]

bool isTopToBottom( $polygon &$polygon)

Returns TRUE if the line is going all the way from the top to the bottom of the polygon surrounding box.



Parameters:

$polygon   &$polygon   Polygon A Polygon object

[ Top ]

method isVertical [line 525]

bool isVertical( )

Test if the line is a vertical line



[ Top ]

method setLocation [line 340]

void setLocation( $p1 $p1, $p2 $p2)

Change line location



Parameters:

$p1   $p1   First point
$p2   $p2   Second point

[ Top ]

method setX [line 308]

void setX( int $x1, int $x2)

Change X values of the line



Parameters:

int   $x1   Begin value
int   $x2   End value

[ Top ]

method setY [line 324]

void setY( int $y1, int $y2)

Change Y values of the line



Parameters:

int   $y1   Begin value
int   $y2   End value

[ Top ]


Documentation generated on Sat, 08 Nov 2008 14:53:11 +0100 by phpDocumentor 1.4.1