Goto main content

gd_set_pixel

Set a pixel from image.

GD_SET_PIXEL

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

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

© 2021 extenso Inc. All rights reserved.