append patch:about rtgui_dc_client_blit_line.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1650 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
parent
a8410acdaa
commit
6f8bf54fb0
|
@ -443,7 +443,7 @@ static void rtgui_dc_client_blit_line (struct rtgui_dc* self, int x1, int x2, in
|
||||||
if (rtgui_region_is_flat(&(owner->clip)) == RT_EOK)
|
if (rtgui_region_is_flat(&(owner->clip)) == RT_EOK)
|
||||||
{
|
{
|
||||||
rtgui_rect_t* prect;
|
rtgui_rect_t* prect;
|
||||||
|
int offset = 0;
|
||||||
prect = &(owner->clip.extents);
|
prect = &(owner->clip.extents);
|
||||||
|
|
||||||
/* calculate vline intersect */
|
/* calculate vline intersect */
|
||||||
|
@ -453,8 +453,13 @@ static void rtgui_dc_client_blit_line (struct rtgui_dc* self, int x1, int x2, in
|
||||||
if (prect->x1 > x1) x1 = prect->x1;
|
if (prect->x1 > x1) x1 = prect->x1;
|
||||||
if (prect->x2 < x2) x2 = prect->x2;
|
if (prect->x2 < x2) x2 = prect->x2;
|
||||||
|
|
||||||
|
/* patch note:
|
||||||
|
* We need to adjust the offset when update widget clip!
|
||||||
|
* Of course at ordinary times for 0. General */
|
||||||
|
offset = owner->clip.extents.x1 - owner->extent.x1;
|
||||||
|
offset = offset * hw_driver->bits_per_pixel/8;
|
||||||
/* draw hline */
|
/* draw hline */
|
||||||
hw_driver->ops->draw_raw_hline(line_data, x1, x2, y);
|
hw_driver->ops->draw_raw_hline(line_data+offset, x1, x2, y);
|
||||||
}
|
}
|
||||||
else for (index = 0; index < rtgui_region_num_rects(&(owner->clip)); index ++)
|
else for (index = 0; index < rtgui_region_num_rects(&(owner->clip)); index ++)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue