[Webkit-unassigned] [Bug 31862] Lines in svg shift up 1 pixel

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 25 07:01:28 PST 2009


https://bugs.webkit.org/show_bug.cgi?id=31862


Eric Seidel <eric at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |oliver at apple.com




--- Comment #1 from Eric Seidel <eric at webkit.org>  2009-11-25 07:01:27 PST ---
http://www.w3.org/TR/SVG/render.html#PaintingShapesAndText

"A stroke operation is centered on the outline of the object; thus, in effect,
half of the paint falls on the interior of the shape and half of the paint
falls outside of the shape."

So a stroke of 1px will end up with only 0.5px of visible stroke at normal
zoom.  0.5px might fall below the minimum displayed stroke and might end up
hidden.  I'm not yet certain.


>From the Cocoa Drawing Guide (which talks about the NS* wrappers around
CoreGraphics):
https://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/CocoaDrawingGuide/Paths/Paths.html#//apple_ref/doc/uid/TP40003290-CH206-BBCHFJJG

Fractional line widths are rendered as close as possible to the specified
width, subject to the limitations of the destination device, the position of
the line, and the current anti-aliasing setting. For example, suppose you want
to draw a line whose width is 0.2 points. Multiplying this width by 1/72 points
per inch yields a line that is 0.0027778 inches wide. On a 90 dpi screen, the
smallest possible line would be 1 pixel wide or 0.0111 inches. To ensure your
line is not hidden on the screen, Cocoa nominally draws it at the screen’s
larger minimum width (0.0111 inches). In reality, if the line straddles a pixel
boundary or anti-aliasing is enabled, the line might affect additional pixels
on either side of the path. If the output device were a 600 dpi printer
instead, Quartz would be able to render the line closer to its true width of
0.0027778 inches.

So I'm not sure.  I'm not sure yet if CG's behavior is correct according to SVG
or not.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list