23.08.2011 19:06, Tor Lillqvist пишет:
I tried to draw polyline.... But on Windows... the end point is not drawn...
I am not saying your patch is not useful, but just out of interest, how do you interpret the word "point" in
the GDI documentation for LineTo()? Does it in fact simply mean "pixel"? But what if the current pen is wider
than one pixel? Or is the vagueness intentional and any expectation of pixel-perect repeatable results with different
graphics devices and drivers is futile?
Compared to how strictly mathematically X11 graphics is defined for wide lines, the GDI
"specification" is just horrible.
--tml
Hello, Tor!
Very good questions!
I think «point» means «pixel». Line as an object is described in MSDN
only for «raster» devices (pixels on screen or dots on paper). Moreover
word «point» is used as set of parameters (x and y coordinated) for
function. Maybe I'm wrong, but in case of continuous space (maybe vector
graphics) we have line without end point (open line at its end) that
causes problem when we try to show such line on raster device. Should we
draw last pixel or not? it contains both an end of line and an end
point. I don't know how this function [LineTo()] may be used to create a
continuous line. Windows metafile seems as packed script, it doesn't
represent a really vector graphics format.
In case of wider pen, another overloaded function «drawPolyLine()» is
called that uses GDI+ or thick lines is represented as polygons. So, for
thick lines my solution [patch] doesn't work and no additional pixel is
drawn (patch doesn't break drawing thick lines). Moreover I tried to
draw thick polyline. the thick polylines on Windows and on Linux are the
same.
--
Best Regards,
Dmitry
begin:vcard
fn:Dmitry Ashkadov
n:Ashkadov;Dmitry
email;internet:dmitry.ashkadov@gmail.com
note:JID: dmitryash@jabber.mipt.ru
version:2.1
end:vcard
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.