contents   index   previous   next



GD setPixel()

syntax:

gd.setPixel(x, y, color)

gd.setPixel(point, color)

where:

x - horizontal position of pixel, measured from left

 

y - vertical position of pixel, measured from top

 

point - A point specification.

 

color - index into color table

 

return:

void.

 

description:

This method sets the designated pixel to the appropriate color. If either x or y is out of bounds, or if color is not a valid color index, then nothing is done.

 

see:

#link <gd>, GD getPixel(), GD colorAllocate()

 

example:

var gd = new GD(4,4);

var black = gd.colorAllocate(0,0,0);

gd.setPixel(0,0,black);

 


GD setStyle()