ImgSetPixel
Previous  Top  Next

Prototype

ImgSetPixel(intImageHandle; intX,intY;intColor)

Description

It sets the pixel colour in a specific position.

Parameters

intImageHandle: integer value corresponding to the image handle.

intX: integer value corresponding to the column.

intY: integer value corresponding to the line.

intColor: numeric value showing the colour for the pixel.

Returned value

None.

Notes

None.

Example

// It stores  pixel color caught from a different area from background.
ColorPixel:=ImgGetPixel(_CurrentImage,10,10);

//extracting width and height
width:=ImgGetWidth(_CurrentImage);
height:=ImgGetHeight(_CurrentImage);

// printing a  border around current image using ColorPixel
for x:=0 to width-1 do
   begin
      ImgSetPixel(_CurrentImage,x,0,color);
         ImgSetPixel(_CurrentImage,x,height-1,color);
    end;
for y:=0 to height-1 do
   begin
      ImgSetPixel(_CurrentImage,0,y,color);
      ImgSetPixel(_CurrentImage,width-1,y,color);
   end;

ApplicationLog(_CurrentAgent,'Drawing');