PixelColor
(Engine-Level Function)
Description: | Returns the color of a pixel in the window. |
Returns: | Numeric or String (see 4th parameter) |
Usage: | Script or steady state. |
Function Groups: | Color, Graphics |
Related to: | GetSystemColor |
Format: | PixelColor(Object, X,Y[,UseRGB]) |
Parameters: |
Object |
Required. Any expression that returns an object value. This identifies the window where the pixel is drawn. |
X |
Required. Any numeric expression, giving the x-axis coordinate of the location of the pixel. |
Y |
Required. Any numeric expression, giving the y-axis coordinate of the location of the pixel. |
UseRGB |
Optional. Any Boolean expression, which when true, will cause the pixel color to be returned as an RGB string. If false, the numeric palette value will be returned. |
Comments: | Location (x, y) is taken to be in the window where the module instance identified by Object is drawn. |
Example:
mouseColor = PixelColor(Self(),XLoc(),YLoc());
This finds the color under the mouse in the window where this function is defined.