You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openoffice.apache.org by bu...@apache.org on 2013/10/02 10:39:22 UTC

[Bug 123401] New: [SVG] special treatment for marker on zero-length path segment is missing

https://issues.apache.org/ooo/show_bug.cgi?id=123401

            Bug ID: 123401
        Issue Type: DEFECT
           Summary: [SVG] special treatment for marker on zero-length path
                    segment is missing
           Product: Draw
           Version: 4.1.0-dev
          Hardware: All
               URL: http://www.w3.org/TR/SVG/implnote.html#PathElementImpl
                    ementationNotes
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: open-import
          Assignee: issues@openoffice.apache.org
          Reporter: rb.henschel@t-online.de
                CC: issues@openoffice.apache.org

Created attachment 81688
  --> https://issues.apache.org/ooo/attachment.cgi?id=81688&action=edit
Examples with zero-length path segments

The SVG specification has a special algorithm for markers on zero-length path
segments,
 "Certain line-capping and line-joining situations and markers require that a
path segment have directionality at its start and end points. Zero-length path
segments have no directionality. In these cases, the following algorithm is
used to establish directionality: to determine the directionality of the start
point of a zero-length path segment, go backwards in the path data
specification within the current subpath until you find a segment which has
directionality at its end point (e.g., a path segment with non-zero length) and
use its ending direction; otherwise, temporarily consider the start point to
lack directionality. Similarly, to determine the directionality of the end
point of a zero-length path segment, go forwards in the path data specification
within the current subpath until you find a segment which has directionality at
its start point (e.g., a path segment with non-zero length) and use its
starting direction; otherwise, temporarily consider the end point to lack
directionality. If the start point has directionality but the end point
doesn't, then the end point uses the start point's directionality. If the end
point has directionality but the start point doesn't, then the start point uses
the end point's directionality. Otherwise, set the directionality for the path
segment's start and end points to align with the positive x-axis in user
space."

The current implementation of get_markerRotation in
svgio\source\svgreader\svgstyleattributes.cxx does not consider this algorithm.
The attached zip-file contains a set of svg-graphics and a document with mockup
of expected import results. The results are as I think, they should be
following the given algorithm. Looking at browsers does not really help,
because they do not agree in rendering.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
You are watching all bug changes.

[Bug 123401] [SVG] special treatment for marker on zero-length path segment is missing

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=123401

--- Comment #4 from Armin Le Grand <Ar...@me.com> ---
ALG: Sloved together with task 123379, see there. Not yet setting to double.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are watching all bug changes.

[Bug 123401] [SVG] special treatment for marker on zero-length path segment is missing

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=123401

Armin Le Grand <Ar...@me.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ACCEPTED                    |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #5 from Armin Le Grand <Ar...@me.com> ---
ALG: Setting to duplicate, task 123379 will also solve this task.

*** This bug has been marked as a duplicate of bug 123379 ***

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are watching all bug changes.

[Bug 123401] [SVG] special treatment for marker on zero-length path segment is missing

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=123401

--- Comment #3 from Armin Le Grand <Ar...@me.com> ---
ALG: Okay, +1. Adde to the code, will add a patch to 123397 containing this
(code there is influenced by this).

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are watching all bug changes.

[Bug 123401] [SVG] special treatment for marker on zero-length path segment is missing

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=123401

Armin Le Grand <Ar...@me.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ACCEPTED
                 CC|                            |Armin.Le.Grand@me.com
           Assignee|issues@openoffice.apache.or |Armin.Le.Grand@me.com
                   |g                           |
     Ever confirmed|0                           |1

--- Comment #1 from Armin Le Grand <Ar...@me.com> ---
ALG: Added code to do that; all look pretty as expected (as the mockups) except
'Zerolength_at_mid_direction_at_start_and_end.svg'. There, all four created mid
have the same orientation, as if only three points would exist. This is exactly
what I expect when I
- go back the edges until I find a non-zero edge
- go forward the edges until I find a non-zero edge

Thus, I think that mockup is not correct for the cited algorithm.
Regina?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
You are watching all bug changes.

[Bug 123401] [SVG] special treatment for marker on zero-length path segment is missing

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=123401

--- Comment #2 from Regina Henschel <rb...@t-online.de> ---
Armin: In the meantime I too think, that one angle bisector for all marker-mids
is correct. In the beginning I thought a zero-length path segment is the same
as no path segment. I the meantime I think, that a zero-length path segment
counts as incoming or outgoing path segment and only its direction has to be
determined in the special algorithm.
(BTW, I'm going to test your patch attached to 123379 with my test files.)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are watching all bug changes.