Line | |
---|
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 | */
|
---|
13 | function ofc_arrow($x, $y, $a, $b, $colour, $barb_length=10)
|
---|
14 | {
|
---|
15 | $this->type = "arrow";
|
---|
16 | $this->start = array("x"=>$x, "y"=>$y);
|
---|
17 | $this->end = array("x"=>$a, "y"=>$b);
|
---|
18 | $this->colour($colour);
|
---|
19 | $this->{"barb-length"} = $barb_length;
|
---|
20 | }
|
---|
21 |
|
---|
22 | function colour( $colour )
|
---|
23 | {
|
---|
24 | $this->colour = $colour;
|
---|
25 | return $this;
|
---|
26 | }
|
---|
27 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.