Hi Regina,

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.

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.

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"

It would be possible to do so, but B2DPolygon is a low-level tooling class and used in many places and should stay as simple as possible, while there is only one place where knowledge about the source of a created point is needed: Inside the SVG import. I already thought about this (you wrote a task for it, I saw and know it ;-) and the easiest way to solve this currently would be to extend the svg:d importer in basegfx to return a B2DPolyPolygon and (on demand evetually) a sequence of sequence of flags. The only use of this currently is to create markers for SVG, thus I would keep it to the places where it is needed.

I would also like to wait to aw080, as I already said, the svg:d import is unified there and there is only one single svg:d importer left.

HTH!


Kind regards
Regina

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



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

Reply via email to