From ab910baffbf9585f5376f6a40f70490a5c765257 Mon Sep 17 00:00:00 2001 From: graemeg Date: Tue, 6 Nov 2007 14:04:06 +0000 Subject: * SetLineStyle and LineWidth are now fully supported under X11 and GDI. Drawing results are identical. --- src/corelib/x11/gfx_x11.pas | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'src/corelib/x11') diff --git a/src/corelib/x11/gfx_x11.pas b/src/corelib/x11/gfx_x11.pas index 014efc8b..6a1531bd 100644 --- a/src/corelib/x11/gfx_x11.pas +++ b/src/corelib/x11/gfx_x11.pas @@ -1501,38 +1501,34 @@ var aCapStyle: Longint; begin aCapStyle := CapNotLast; - if awidth < 0 then - begin - { Alternative line drawing - Using X algorithm instead of hardware algorithm } - awidth := -awidth; - if (awidth > 1) and (astyle = lsSolid) then - aCapStyle := CapButt; - end - else - awidth := 0; + // Is this still needed?? I don't think so + //if (awidth > 1) and (astyle = lsSolid) then + // aCapStyle := CapButt; + if awidth = 1 then + awidth := 0; // switch to hardware algorithm case AStyle of lsDot: begin - XSetLineAttributes(xapplication.display, Fgc, 1, + XSetLineAttributes(xapplication.display, Fgc, awidth, LineOnOffDash, aCapStyle, JoinMiter); XSetDashes(xapplication.display, Fgc, 0, cDot, 2); end; lsDash: begin - XSetLineAttributes(xapplication.display, Fgc, 1, + XSetLineAttributes(xapplication.display, Fgc, awidth, LineOnOffDash, aCapStyle, JoinMiter); XSetDashes(xapplication.display, Fgc, 0, cDash, 2); end; lsDashDot: begin - XSetLineAttributes(xapplication.display, Fgc, 1, + XSetLineAttributes(xapplication.display, Fgc, awidth, LineOnOffDash, aCapStyle, JoinMiter); XSetDashes(xapplication.display, Fgc, 0, cDashDot, 4); end; lsDashDotDot: begin - XSetLineAttributes(xapplication.display, Fgc, 1, + XSetLineAttributes(xapplication.display, Fgc, awidth, LineOnOffDash, aCapStyle, JoinMiter); XSetDashes(xapplication.display, Fgc, 0, cDashDotDot, 6); end; -- cgit v1.2.3-70-g09d2