Page 82 Epson Research and Development
Vancouver Design Center
S1D13505 Programming Notes and Examples
X23A-G-003-07 Issue Date: 01/02/05
color_blue = BLUE16BPP;
break;
}
/*
** Draw a Blue line from top left hand corner to bottom right hand
corner */
if (seDrawLine(DevId, 0,0, width-1, height-1, color_blue) != ERR_OK)
{printf("\r\nERROR: Unable to draw line\r\n");
return -1;
}
/*
** Delay for 2 seconds and then draw a filled rectangle
*/
seDelay(DevId, (DWORD)2);
/*
** Centre the rectangle at 1/4 x,y and 3/4 x,y
*/
x1 = width/4;
x2 = width/2 + x1;
y1 = height/4;
y2 = height/2 + y1;
seDrawRect(DevId, x1, y1, x2, y2, color_red, TRUE);
/*
** Draw a box around the screen
*/
if ((seDrawLine(DevId, 0, 0, width-1, 0, color_blue) != ERR_OK)
|(seDrawLine(DevId, 0, height-1, width-1, height-1, color_blue) !=
ERR_OK) |(seDrawLine(DevId, 0, 0, 0, height-1, color_blue) != ERR_OK)
|(seDrawLine(DevId, width-1, 0, width-1, height-1, color_blue) !=
ERR_OK)) {printf("\r\nERROR: Unable to draw box\r\n");
return -1;
}
/*
** Load a cursor with a blue outlined green rectangle
*/
seInitCursor(DevId);
seCursorOff(DevId);
seSetCursorColor(DevId, 0, GREEN16BPP);
seSetCursorColor(DevId, 1, BLUE16BPP);
seDrawCursorRect(DevId, 0, 0, 63, 63, 1, FALSE);
seDrawCursorRect(DevId, 1, 1, 62, 62, 0, TRUE);
seCursorOn(DevId);