|
发表于 2016-1-6 11:51:16
|
显示全部楼层
/*********************************************************************
*
* _FillRect
*/
static void _FillRect(GUI_DEVICE * pDevice, int x0, int y0, int x1, int y1) {
#if 0
LCD_PIXELINDEX PixelIndex;
int x;
PixelIndex = LCD__GetColorIndex();
if (GUI_pContext->DrawMode & LCD_DRAWMODE_XOR) {
for (; y0 <= y1; y0++) {
for (x = x0; x <= x1; x++) {
_XorPixel(pDevice, x, y0);
}
}
} else {
for (; y0 <= y1; y0++) {
for (x = x0; x <= x1; x++) {
_SetPixelIndex(pDevice, x, y0, PixelIndex);
}
}
}
#endif
int i;
int x;
LCD_PIXELINDEX PixelIndex;
PixelIndex = LCD__GetColorIndex();
/*一定要判断这个模式,不然不能闪烁*/
if (GUI_pContext->DrawMode & LCD_DRAWMODE_XOR) {
for (; y0 <= y1; y0++) {
for (x = x0; x <= x1; x++) {
_XorPixel(pDevice, x, y0);
}
}
} else {
for(i = 0; i < (y1 - y0 + 1); i++) {
/*添加自己的驱动*/
OLED_DrawHLine(x0, y0 + i, (x1-x0 + 1), PixelIndex);
}
}
} |
|