gd_ellipse

Draw an ellipse.

GD_ELLIPSE

NAME

gd_ellipse - Draws an ellipse.

SYNOPSIS

gd_ellipse (gd:variable, cx:integer, cy:integer, width:integer, height:integer, color:"string", coloridx:integer);

DESCRIPTION

gdImageFilledEllipse is used to draw an ellipse centered at the given point, with the specified width and height in pixels. The ellipse is filled in the color.

PARAMETERS

gd
Variable must hold a returned value from gd_new
cx,cy
Center point of ellipse.
width, height
Width and height of ellipse.
color
A color in the format #000000 or #255,255,255
coloridx
A color index get from gd_get_color

RETURN

Nothing.

MODULES

To use this module, you must specify the following in /usr/local/website/site.conf:

Module gd {
        Library : "/usr/local/lib/libsngd.so"
        Init : "sngd_init"
}

EXAMPLES

res=<{
        %include "/includes/gd.sn";
        remove("/html/images/print.jpg");
        im=gd_new(width:1000,height:1000,bgcolor:Gray,truecolor:true);
        red = gd_get_color(gd:im, color:Red);
        cyan = gd_get_color(gd:im, color:Cyan);
        white = gd_get_color(gd:im, color:White);
        gd_ellipse(gd:im, cx:500,cy:500, width:100, color:Blue, height:100);
        gd_write(gd:im,format:"jpg",filename:"/html/images/print.jpg",quality:100);
        }>.

SEE ALSO

AUTHOR

Written by Pierre Laplante and Caroline Laplante, <laplante@sednove.com>

MODIFICATIONS

1.0 2014-09-09 21:24:14 laplante@sednove.com

Edit

© 2024 extenso Inc. All rights reserved.