Commit 4f36287d authored by Martin Schreiber's avatar Martin Schreiber

* tcanvas.drawlines() removes last segment with zero length, fixes not drawing...

* tcanvas.drawlines() removes last segment with zero length, fixes not drawing endpoint (sideffect of X11 0-with linends workaround).
parent bee0acd4
...@@ -4956,6 +4956,12 @@ begin ...@@ -4956,6 +4956,12 @@ begin
end; end;
count:= acount; count:= acount;
end; end;
int1:= count - 2;
if (int1 > 0) and (apoints[int1].x = apoints[int1+1].x) and
(apoints[int1].y = apoints[int1+1].y) then begin
//coincident endpoints are not drawn on x11
dec(count);
end;
closed:= aclosed; closed:= aclosed;
points:= @apoints[first]; points:= @apoints[first];
end; end;
......
...@@ -1356,6 +1356,7 @@ begin ...@@ -1356,6 +1356,7 @@ begin
xmask:= xmask or gctile; xmask:= xmask or gctile;
end; end;
end; end;
if needslinecheck then begin if needslinecheck then begin
if (gclinewidth_ = 0) and not (xfts_smooth in xftstate) then begin if (gclinewidth_ = 0) and not (xfts_smooth in xftstate) then begin
xvalues.line_width:= 1; xvalues.line_width:= 1;
...@@ -1372,6 +1373,7 @@ begin ...@@ -1372,6 +1373,7 @@ begin
end; end;
xmask:= xmask or (gclinewidth or gccapstyle); xmask:= xmask or (gclinewidth or gccapstyle);
end; end;
if xmask <> 0 then begin if xmask <> 0 then begin
xchangegc(appdisp,agc,xmask,@xvalues); xchangegc(appdisp,agc,xmask,@xvalues);
end; end;
......
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