Commit e728b990 authored by Claes Sjofors's avatar Claes Sjofors

Ge line drawing bugfix

parent a5a1b576
...@@ -1419,6 +1419,13 @@ int GlowDrawGtk::arc_erase( GlowWind *wind, int x, int y, int width, int height, ...@@ -1419,6 +1419,13 @@ int GlowDrawGtk::arc_erase( GlowWind *wind, int x, int y, int width, int height,
if ( ctx->nodraw) return 1; if ( ctx->nodraw) return 1;
DrawWindGtk *w = (DrawWindGtk *) wind->window; DrawWindGtk *w = (DrawWindGtk *) wind->window;
if ( w->clip_on &&
!(w->clip_rectangle[w->clip_cnt-1].x <= x + width &&
w->clip_rectangle[w->clip_cnt-1].x + w->clip_rectangle[w->clip_cnt-1].width >= x &&
w->clip_rectangle[w->clip_cnt-1].y <= y + height &&
w->clip_rectangle[w->clip_cnt-1].y + w->clip_rectangle[w->clip_cnt-1].height >= y))
return 1;
// if ( width < 35 && height < 35) {width++; height++;} // This looks good in Reflexion X ... // if ( width < 35 && height < 35) {width++; height++;} // This looks good in Reflexion X ...
if ( angle1 >= 360) if ( angle1 >= 360)
...@@ -1450,10 +1457,10 @@ int GlowDrawGtk::line( GlowWind *wind, int x1, int y1, int x2, int y2, ...@@ -1450,10 +1457,10 @@ int GlowDrawGtk::line( GlowWind *wind, int x1, int y1, int x2, int y2,
DrawWindGtk *w = (DrawWindGtk *) wind->window; DrawWindGtk *w = (DrawWindGtk *) wind->window;
if ( w->clip_on && if ( w->clip_on &&
!(w->clip_rectangle[w->clip_cnt-1].x <= x2 && !(w->clip_rectangle[w->clip_cnt-1].x <= max(x1,x2) &&
w->clip_rectangle[w->clip_cnt-1].x + w->clip_rectangle[w->clip_cnt-1].width >= x1 && w->clip_rectangle[w->clip_cnt-1].x + w->clip_rectangle[w->clip_cnt-1].width >= min(x1,x2) &&
w->clip_rectangle[w->clip_cnt-1].y <= y2 && w->clip_rectangle[w->clip_cnt-1].y <= max(y1,y2) &&
w->clip_rectangle[w->clip_cnt-1].y + w->clip_rectangle[w->clip_cnt-1].height >= y1)) w->clip_rectangle[w->clip_cnt-1].y + w->clip_rectangle[w->clip_cnt-1].height >= min(y1,y2)))
return 1; return 1;
// Fix for highlight for connections in grow // Fix for highlight for connections in grow
...@@ -1486,6 +1493,13 @@ int GlowDrawGtk::line_dashed( GlowWind *wind, int x1, int y1, int x2, int y2, ...@@ -1486,6 +1493,13 @@ int GlowDrawGtk::line_dashed( GlowWind *wind, int x1, int y1, int x2, int y2,
if ( ctx->nodraw) return 1; if ( ctx->nodraw) return 1;
DrawWindGtk *w = (DrawWindGtk *) wind->window; DrawWindGtk *w = (DrawWindGtk *) wind->window;
if ( w->clip_on &&
!(w->clip_rectangle[w->clip_cnt-1].x <= max(x1,x2) &&
w->clip_rectangle[w->clip_cnt-1].x + w->clip_rectangle[w->clip_cnt-1].width >= min(x1,x2) &&
w->clip_rectangle[w->clip_cnt-1].y <= max(y1,y2) &&
w->clip_rectangle[w->clip_cnt-1].y + w->clip_rectangle[w->clip_cnt-1].height >= min(y1,y2)))
return 1;
// Fix for highlight for connections in grow // Fix for highlight for connections in grow
if ( highlight && ctx->type() == glow_eCtxType_Grow) if ( highlight && ctx->type() == glow_eCtxType_Grow)
gc_type = glow_eDrawType_LineHighlight; gc_type = glow_eDrawType_LineHighlight;
...@@ -1561,6 +1575,13 @@ int GlowDrawGtk::line_erase( GlowWind *wind, int x1, int y1, int x2, int y2, ...@@ -1561,6 +1575,13 @@ int GlowDrawGtk::line_erase( GlowWind *wind, int x1, int y1, int x2, int y2,
if ( ctx->nodraw) return 1; if ( ctx->nodraw) return 1;
DrawWindGtk *w = (DrawWindGtk *) wind->window; DrawWindGtk *w = (DrawWindGtk *) wind->window;
if ( w->clip_on &&
!(w->clip_rectangle[w->clip_cnt-1].x <= max(x1,x2) &&
w->clip_rectangle[w->clip_cnt-1].x + w->clip_rectangle[w->clip_cnt-1].width >= min(x1,x2) &&
w->clip_rectangle[w->clip_cnt-1].y <= max(y1,y2) &&
w->clip_rectangle[w->clip_cnt-1].y + w->clip_rectangle[w->clip_cnt-1].height >= min(y1,y2)))
return 1;
if ( w->clip_on) if ( w->clip_on)
set_clip( w, get_gc( this, glow_eDrawType_LineErase, idx)); set_clip( w, get_gc( this, glow_eDrawType_LineErase, idx));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment