commiting uncommited changes on live site
[weblabels.fsf.org.git] / crm.fsf.org / 20131203 / files / sites / all / modules-old / civicrm / packages / OpenFlashChart / php-ofc-library / ofc_arrow.php
1 <?php
2
3 class ofc_arrow
4 {
5 /**
6 *@param $x as number. Start x position
7 *@param $y as number. Start y position
8 *@param $a as number. End x position
9 *@param $b as number. End y position
10 *@param $colour as string.
11 *@param $barb_length as number. Length of the barbs in pixels.
12 *@param $stroke as number. Width of the arrow in pixels.
13 */
14 function ofc_arrow($x, $y, $a, $b, $colour, $barb_length=10, $stroke=1)
15 {
16 $this->type = "arrow";
17 $this->start = array("x"=>$x, "y"=>$y);
18 $this->end = array("x"=>$a, "y"=>$b);
19 $this->colour($colour);
20 $this->{"barb-length"} = $barb_length;
21 $this->{"stroke"} = $stroke;
22 }
23
24 function colour( $colour )
25 {
26 $this->colour = $colour;
27 return $this;
28 }
29 }