Hi Andre,

Andre Fischer schrieb:
On 21.10.2013 15:02, Regina Henschel wrote:
Hi all,

I write to the list, because I think the list is more appropriate to
discuss an idea than an issue.

Objects of the class ImplB2DPolygon are used to store the points,
which are read from an svg:d attribute. This attribute is not only
used in svg-graphics itself, but in dr3d:extrude, dr3d:rotate,
draw:connector, draw:contour-path, draw:marker and draw:path.

After filled with the points, the information is lost, which part of
the svg:d string has generated the point. This results in following
problems:
* It is currently not possible to distinguish between a closed path
and an open path, when first and last point coordinates are identical.
* It is not possible to distinguish between a path starting by a
moveto command or starting with another command after a closepath
command.
* It is not possible to notice, that not the whole path is closed, but
the path ends in an unclosed path segment.
* It is not possible to distinguish between points, that origin in the
svg:d attribute and those, which are added to draw a curve.

Can you tell us in what situations these items cause problems?

[SVG] marker-mid missing for empty closepath if first point equals last point
https://issues.apache.org/ooo/show_bug.cgi?id=123465

[SVG] marker-mid on pseudo vertices
https://issues.apache.org/ooo/show_bug.cgi?id=123433

[SVG] marker rotation wrong on line close line sequence in d attribute in path element
https://issues.apache.org/ooo/show_bug.cgi?id=123410

z command in d attribute in svg sets the 'current point' wrong
https://issues.apache.org/ooo/show_bug.cgi?id=119118



My proposal is to expand the class with a mpCommandVector, which can
store for each point an additional information about the point's
origin, for example
the command letter, when the point corresponds directly to a command
letter in the svg:d string,
or a “internal” flag letter, for example when the point was generated
by adding points to draw an arc.

Without knowing what the actual problem is, this looks like a hack. Is
it possible to use a more direct approach, ie. if it is important to
distinguish between geometrical and structural closedness (item 1) then
add a flag to the path.  After all, you might be interested in this
information even when the path was not read from an SVG string.

It has already a flag, but that is not enough to solve the case of unclosed path end (item 3).

Kind regards
Regina


-Andre


With such additional information it would be possible to distinguish
between
svg:d="M0,0 h20 v20 h-20 v-20" and svg:d="m0,0 h20 v20 h-20 z" (not
closed or closed)
svg:d="M0,0 h20 v20 z M0,0 40,0" and svg:d="M0,0 h20 v20 z L40,0" (
different direction of markers)
and avoid mid-markers on pseudo vertices in svg:d="m10,50 a40,40 0 1,1
80,0"

Kind regards
Regina


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org

Reply via email to