Epson Research and Development

Page 61

Vancouver Design Center

 

 

 

9.4.6 Drawing

The Drawing routines cover HAL functions that deal with displaying pixels, lines and shapes.

int seSetPixel(long x, long y, DWORD Color)

Description: Draws a pixel at coordinates (x,y) in the requested color. This routine can be used for any color depth.

Parameters: x

- horizontal coordinate of the pixel (starting from 0)

y

- vertical coordinate of the pixel (starting from 0)

Color

- at 1, 2, 4, and 8 bpp Color is an index into the LUT.

 

At 15 and 16 bpp Color defines the color directly

 

(i.e. rrrrrggggggbbbbb for 16 bpp)

Return Value: ERR_OK

- operation completed with no problems.

int seGetPixel(long x, long y, DWORD *pColor)

Description: Reads the pixel color at coordinates (x,y). This routine can be used for any color depth.

Parameters: x

- horizontal coordinate of the pixel (starting from 0)

y

- vertical coordinate of the pixel (starting from 0)

pColor

- at 1, 2, 4, and 8 bpp pColor points to an index into the LUT.

 

At 15 and 16 bpp pColor points to the color directly

 

(i.e. rrrrrggggggbbbbb for 16 bpp)

Return Value: ERR_OK

- operation completed with no problems.

int seDrawLine(int x1, int y1, int x2, int y2, DWORD Color)

Description: This routine draws a line on the display from the endpoints defined by x1,y1 to the endpoint x2,y2 in the requested 'Color'.

Currently seDrawLine() only draws horizontal and vertical lines.

Parameters: (x1, y1)

- first endpoint of the line in pixels

(x2, y2)

- second endpoint of the line in pixels (see note below)

Color

- color to draw with. 'Color' is an index into the LUT.

Return Value: ERR_OK - operation completed with no problems

Note

Functionality differs from the 135x HAL.

Programming Notes and Examples

S1D13705

Issue Date: 02/01/22

X27A-G-002-03

Page 155
Image 155
Epson S1D13705 Drawing, Int seSetPixellong x, long y, Dword Color, Int seGetPixellong x, long y, Dword *pColor