Pass canvas to must_clip_line
This commit is contained in:
parent
47a319bba5
commit
b7d266897c
|
@ -33,13 +33,13 @@ void g3_set_special_render(tmap_drawer_type tmap_drawer)
|
|||
}
|
||||
#if !DXX_USE_OGL
|
||||
//deal with a clipped line
|
||||
static void must_clip_line(g3s_point *p0,g3s_point *p1,ubyte codes_or,const uint8_t color,temporary_points_t &tp)
|
||||
static void must_clip_line(grs_canvas &canvas, g3s_point *p0, g3s_point *p1, const uint8_t codes_or, const uint8_t color, temporary_points_t &tp)
|
||||
{
|
||||
if ((p0->p3_flags&PF_TEMP_POINT) || (p1->p3_flags&PF_TEMP_POINT))
|
||||
; //line has already been clipped, so give up
|
||||
else {
|
||||
clip_line(p0,p1,codes_or,tp);
|
||||
g3_draw_line(*grd_curcanv, *p0, *p1, color, tp);
|
||||
g3_draw_line(canvas, *p0, *p1, color, tp);
|
||||
}
|
||||
|
||||
//free temp points
|
||||
|
@ -72,7 +72,7 @@ void g3_draw_line(grs_canvas &canvas, g3s_point &p0, g3s_point &p1, const uint8_
|
|||
(static_cast<void>((p0.p3_flags & PF_PROJECTED) || (g3_project_point(p0), 0)), p0.p3_flags & PF_OVERFLOW) ||
|
||||
(static_cast<void>((p1.p3_flags & PF_PROJECTED) || (g3_project_point(p1), 0)), p1.p3_flags & PF_OVERFLOW)
|
||||
)
|
||||
return must_clip_line(&p0,&p1,codes_or,color,tp);
|
||||
return must_clip_line(canvas, &p0,&p1, codes_or, color, tp);
|
||||
gr_line(canvas, p0.p3_sx, p0.p3_sy, p1.p3_sx, p1.p3_sy, color);
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue