First commit
This commit is contained in:
commit
c6e2478c40
13918 changed files with 2303184 additions and 0 deletions
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
|
||||
class ofc_arrow
|
||||
{
|
||||
/**
|
||||
*@param $x as number. Start x position
|
||||
*@param $y as number. Start y position
|
||||
*@param $a as number. End x position
|
||||
*@param $b as number. End y position
|
||||
*@param $colour as string.
|
||||
*@param $barb_length as number. Length of the barbs in pixels.
|
||||
*@param $stroke as number. Width of the arrow in pixels.
|
||||
*/
|
||||
function __construct($x, $y, $a, $b, $colour, $barb_length=10, $stroke=1)
|
||||
{
|
||||
$this->type = "arrow";
|
||||
$this->start = array("x"=>$x, "y"=>$y);
|
||||
$this->end = array("x"=>$a, "y"=>$b);
|
||||
$this->colour($colour);
|
||||
$this->{"barb-length"} = $barb_length;
|
||||
$this->{"stroke"} = $stroke;
|
||||
}
|
||||
|
||||
function colour( $colour )
|
||||
{
|
||||
$this->colour = $colour;
|
||||
return $this;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue