summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
author[email protected] <[email protected]>2011-08-22 03:31:29 +0000
committer[email protected] <[email protected]>2011-08-22 03:31:29 +0000
commit825a978c75fab28b45f8faad734f93c7bbb3dfc4 (patch)
tree2f397fcb9cba4339a2c5f4b18f934c8d0c4c6003 /components
parent3dcb78d3e09224443d7536e0692835418c2d2a02 (diff)
dc_hw draw_point cross check.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1675 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'components')
-rw-r--r--components/rtgui/common/dc_hw.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/components/rtgui/common/dc_hw.c b/components/rtgui/common/dc_hw.c
index c0dac5c6ea..23f7c0aefb 100644
--- a/components/rtgui/common/dc_hw.c
+++ b/components/rtgui/common/dc_hw.c
@@ -227,7 +227,9 @@ static void rtgui_dc_hw_draw_point(struct rtgui_dc* self, int x, int y)
dc = (struct rtgui_dc_hw*) self;
x = x + dc->owner->extent.x1;
+ if(x < dc->owner->extent.x1 || x >= dc->owner->extent.x2) return;
y = y + dc->owner->extent.y1;
+ if(y < dc->owner->extent.y1 || y >= dc->owner->extent.y2) return;
/* draw this point */
dc->hw_driver->ops->set_pixel(&(dc->owner->gc.foreground), x, y);