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

Class: awLine

Source Location: /class/system/artichow/php5/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 Constants

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

$p1 =

[line 246]

Line first point



Tags:

access:  public

Type:   mixed


[ Top ]

$p2 =

[line 253]

Line second point



Tags:

access:  public

Type:   mixed


[ Top ]



Class Methods


static method build [line 293]

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

Build a line from 4 coords



Tags:

access:  public


Parameters:

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

[ Top ]

constructor __construct [line 277]

awLine __construct( [awPoint $p1 = NULL], [awPoint $p2 = NULL], [int $type = awLine::SOLID], [int $thickness = 1])

Build a new awline



Tags:

access:  public


Parameters:

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

[ 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
access:  public


[ Top ]

method getLocation [line 359]

void getLocation( array 0)

Get line location



Tags:

access:  public


Parameters:

array   0   Line location

[ Top ]

method getOrigin [line 438]

float getOrigin( )

Get the line y-intercept value



Tags:

access:  public


[ Top ]

method getSize [line 368]

float getSize( )

Get the line size



Tags:

access:  public


[ Top ]

method getSlope [line 422]

float getSlope( )

Get the line slope value



Tags:

access:  public


[ 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
access:  public


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
access:  public


Parameters:

float   $x   The x coordinate of the Point

[ Top ]

method isHorizontal [line 534]

bool isHorizontal( )

Test if the line is an horizontal line



Tags:

access:  public


[ Top ]

method isLeftToRight [line 575]

bool isLeftToRight( awPolygon $polygon)

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



Tags:

access:  public


Parameters:

$polygon   $polygon   Polygon A Polygon object

[ Top ]

method isPoint [line 516]

bool isPoint( )

Test if the line can be considered as a point



Tags:

access:  public


[ Top ]

method isTopToBottom [line 545]

bool isTopToBottom( awPolygon $polygon)

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



Tags:

access:  public


Parameters:

$polygon   $polygon   Polygon A Polygon object

[ Top ]

method isVertical [line 525]

bool isVertical( )

Test if the line is a vertical line



Tags:

access:  public


[ Top ]

method setLocation [line 340]

void setLocation( awPoint $p1, awPoint $p2)

Change line location



Tags:

access:  public


Parameters:

awPoint   $p1   First point
awPoint   $p2   Second point

[ Top ]

method setX [line 308]

void setX( int $x1, int $x2)

Change X values of the line



Tags:

access:  public


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



Tags:

access:  public


Parameters:

int   $y1   Begin value
int   $y2   End value

[ Top ]


Documentation generated on Thu, 03 May 2012 15:06:11 +0200 by phpDocumentor 1.4.1