[ Index ]
 

Code source de Cr@wltr@ck 2.2.1

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/graphs/artichow/php4/inc/ -> Math.class.php (sommaire)

(pas de description)

Poids: 494 lignes (7 kb)
Inclus ou requis: 2 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 5 classes

awShape:: (7 méthodes):
  setStyle()
  getStyle()
  setThickness()
  getThickness()
  hide()
  show()
  isHidden()

awPoint:: (7 méthodes):
  awPoint()
  setX()
  setY()
  setLocation()
  getLocation()
  getDistance()
  move()

awLine:: (10 méthodes):
  awLine()
  build()
  setX()
  setY()
  setLocation()
  getLocation()
  getSize()
  isPoint()
  isVertical()
  isHorizontal()

awVector:: (1 méthode):
  getAngle()

awPolygon:: (5 méthodes):
  set()
  append()
  get()
  count()
  all()


Classe: awShape  - X-Ref

setStyle($style)   X-Ref
Change shape style

param: int $style Line style

getStyle()   X-Ref
Return shape style

return: int

setThickness($thickness)   X-Ref
Change shape thickness

param: int $thickness Shape thickness in pixels

getThickness()   X-Ref
Return shape thickness

return: int

hide($hide)   X-Ref
Hide the shape

param: bool $hide

show($shape)   X-Ref
Show the shape

param: bool $shape

isHidden()   X-Ref
Is the line hidden ?

return: bool

Classe: awPoint  - X-Ref

Describe a point

awPoint($x, $y)   X-Ref
Build a new awpoint

param: float $x
param: float $y

setX($x)   X-Ref
Change X value

param: float $x

setY($y)   X-Ref
Change Y value

param: float $y

setLocation($x, $y)   X-Ref
Change point location

param: float $x
param: float $y

getLocation()   X-Ref
Get point location

param: array Point location

getDistance($p)   X-Ref
Get distance to another point

param: $p A point
return: float

move($x, $y)   X-Ref
Move the point to another location

param: Point A Point with the new awlocation

Classe: awLine  - X-Ref

Describe a line

awLine($p1 = NULL, $p2 = NULL, $type = LINE_SOLID, $thickness = 1)   X-Ref
Build a new awline

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

build($x1, $y1, $x2, $y2)   X-Ref
Build a line from 4 coords

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

setX($x1, $x2)   X-Ref
Change X values of the line

param: int $x1 Begin value
param: int $x2 End value

setY($y1, $y2)   X-Ref
Change Y values of the line

param: int $y1 Begin value
param: int $y2 End value

setLocation($p1, $p2)   X-Ref
Change line location

param: $p1 First point
param: $p2 Second point

getLocation()   X-Ref
Get line location

param: array Line location

getSize()   X-Ref
Get the line size

return: float

isPoint()   X-Ref
Test if the line can be considered as a point

return: bool

isVertical()   X-Ref
Test if the line is a vertical line

return: bool

isHorizontal()   X-Ref
Test if the line is an horizontal line

return: bool

Classe: awVector  - X-Ref

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

getAngle()   X-Ref
Get vector angle in radians

return: float

Classe: awPolygon  - X-Ref

Describe a polygon

set($pos, $point)   X-Ref
Set a point in the polygon

param: int $pos Point position
param: $point

append($point)   X-Ref
Add a point at the end of the polygon

param: $point

get($pos)   X-Ref
Get a point at a position in the polygon

param: int $pos Point position
return: Point

count()   X-Ref
Count number of points in the polygon

return: int

all()   X-Ref
Returns all points in the polygon

return: array



Généré le : Thu Sep 6 14:14:11 2007 par Balluche grâce à PHPXref 0.7