
Page 90
Epson Research and Development
Vancouver Design Center
S1D13706
Programming Notes and Examples
X31B-G-003-03
Issue Date: 01/02/23
DWORD seGetPixel(long x, long y)
DWORD seGetMainWinPixel(long x, long y)
DWORD seGetSubWinPixel(long x, long y)
Description:
Returns the pixel color at the specified display location.
Use seGetPixel() to read the pixel color at the specified (x,y) co-ordinates on the current
active surface. See seSetMainWinAsActiveSurface() and seSetSubWinAsActiveSurface()
for information about changing the active surface.
Use seGetMainWinPixel() and seGetSubWinPixel() to read the pixel color at the specified
(x,y) co-ordinate on the display surface referenced in the function name.
Parameters:
x
The X co-ordinate, in pixels, of the pixel to read
y
The Y co-ordinate, in pixels, of the pixel to read
Return Value:
The return value is a dword describing the color read at the (x,y) co-ordinate. Color is
interpreted differently at different color depths.
If no memory was allocated to the surface, the return value is (DWORD) -1.
At 1, 2, 4 and 8 bpp, display colors are derived from the lookup table values. The return
value is an index into the lookup table. The red, green and blue components of the color
can be determined by reading the lookup table values at the returned index.
At 16 bpp the lookup table is bypassed and each word of display memory form the color to
display. In this mode the least significant word of the return value describes the color as a
5-6-5 RGB value.