mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-21 06:33:31 +00:00
gems: fix clipping in polygon_gfx/line_painter.h
This clipping check happened to wrongly test the surface's clipping area instead of the by 1x1 pixel reduced 'clip' rectangle.
This commit is contained in:
parent
0ff755b236
commit
c0e303632e
@ -128,9 +128,12 @@ struct Line_painter
|
|||||||
*/
|
*/
|
||||||
Rect const clip(surface.clip().p1(), surface.clip().p2() + Point(-1, -1));
|
Rect const clip(surface.clip().p1(), surface.clip().p2() + Point(-1, -1));
|
||||||
|
|
||||||
|
if (!clip.valid())
|
||||||
|
return;
|
||||||
|
|
||||||
/* both points must reside within clipping area */
|
/* both points must reside within clipping area */
|
||||||
if (!surface.clip().contains(Point(x1.integer(), y1.integer())) ||
|
if (!clip.contains(Point(x1.integer(), y1.integer())) ||
|
||||||
!surface.clip().contains(Point(x2.integer(), y2.integer())))
|
!clip.contains(Point(x2.integer(), y2.integer())))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
long const dx_f = x2.value - x1.value,
|
long const dx_f = x2.value - x1.value,
|
||||||
|
Loading…
Reference in New Issue
Block a user