DrawCircle
DrawCircle -- draws a circle on the image
Description
void DrawCircle( DrawingWand drw_wnd, float ox, float oy, float px, float py )
Draws a circle on the image.
The radius of the resuling circle will be the length of the (ox, ox) to
(px, py) diagonal of the rectangle whose shape is outlined similarly to
the following:
(ox, oy) (px, oy)
. .
. .
(ox, py) (px, py)
(px, py) does not have to be to the right and to the bottom of (ox, oy).
An easy way to achieve a circle of a particular radius in PHP follows:
/* Define $desired_radius, $ox, $oy ... */
$px = $py = sqrt( pow( $desired_radius, 2 ) / 2 );
$px += $ox;
$py += $oy;
DrawCircle( $drw_wnd, 0, 0, $px, $py );
A description of each parameter follows:
| drw_wnd | A DrawingWand resource |
| ox | Origin x ordinate |
| oy | Origin y ordinate |
| px | Perimeter x ordinate |
| py | Perimeter y ordinate |