Метод |
Описание |
|
deg2rad ( $degrees ) |
*
* The built-in trig functions use radians and there's no
* function in PHP to convert between degrees and radians |
|
display ( ) |
*
* Make sure the legends are drawn, then output the image to the
* client |
|
draw_heading ( $head_data ) |
*
* This function accepts an array of arrays containing (in order):
* o The text of the heading as a string
* o The fontsize as an integer
* o The justification ("c"=center)
* |
|
draw_legends ( $fontsize ) |
*
* Draw legends at the right side of the pie chart. This function
* accepts a fontsize and gathers all the other information from
* the multilevel data array |
|
draw_margins ( ) |
*
* Also a debugging function to show where the margins are at |
|
draw_point ( $x, $y ) |
*
* This function is just here for debugging purposes. It is
* sometimes very useful to be able to draw an X to check
* coordinates. |
|
draw_slices ( $x, $y, $angles, $colors ) |
*
* This function draws pieces of pie centered at x,y starting at
* "from" degrees and ending at "to" degrees using the specified color. |
|
get_xy_factors ( $degrees ) |
*
* Calculate the directional vector for the sides of the
* piece of pie. |
|
hex2rgb ( $hex ) |
its decimal red, green, blue components. |
|
init ( $w, $h, $d ) |
*
* Initialize the object and draw the pie. This would be the
* constructor in an ordinary OO scenario -- just that we haven't
* got constructors in PHP, now do we? ;-)
*
* RB 09.03.2006:
* - rearranged: please use indentation to seperate if/for blocks/statements!
* - modified to use draw_slices in stead of draw_slice |
|
roundoff ( $v ) |
*
* PHP has no function for rounding off doubles to the nearest
* integer so we have to roll our own. |
|
set_legend_percent ( ) |
* utility function to set an attribute so we display percentages |
|
set_legend_value ( ) |
* utility function to set an attribute so we display values |
|