function

gd_set_pixel . gd . sncode

VERSIONlatest Set a pixel from image.

GD_SET_PIXEL(1e)

NAME

gd_set_pixel - Sets a pixel from image.

SYNOPSIS

gd_set_pixel (gd:variable, x:integer, y:integer, color:"string", coloridx:integer);

DESCRIPTION

This function is used to set a pixel form Image.

PARAMETERS

gd
Variable must hold a returned value from gd_new.
x,y
Point in image.
color
A color in the format #000000 or #255,255,255.
coloridx
A color index gotten 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

color = gd_get_color(gd:im, color:Yellow);
for(i=0;i<1000;++i)
        gd_set_pixel(gd:im, x:i, y:i, coloridx: color);
endfor

AUTHOR

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