Add php files
This commit is contained in:
27
include/ECM/open_flash_chart2/php-ofc-library/ofc_arrow.php
Executable file
27
include/ECM/open_flash_chart2/php-ofc-library/ofc_arrow.php
Executable file
@@ -0,0 +1,27 @@
|
||||
<?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.
|
||||
*/
|
||||
function ofc_arrow($x, $y, $a, $b, $colour, $barb_length=10)
|
||||
{
|
||||
$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;
|
||||
}
|
||||
|
||||
function colour( $colour )
|
||||
{
|
||||
$this->colour = $colour;
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user