diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-11-06 14:04:06 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-11-06 14:04:06 +0000 |
commit | ab910baffbf9585f5376f6a40f70490a5c765257 (patch) | |
tree | 71c129221b6ac8ef1cc322f97fd68da972ffa81e /src/corelib | |
parent | eb820c5ad4574d7394652ed724f89aa5b7ae4e3d (diff) | |
download | fpGUI-ab910baffbf9585f5376f6a40f70490a5c765257.tar.xz |
* SetLineStyle and LineWidth are now fully supported under X11 and GDI.
Drawing results are identical.
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/x11/gfx_x11.pas | 22 |
1 files changed, 9 insertions, 13 deletions
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; |