Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hi all, hi Thorsten (I guess, it's your field of work)

The spec for markers is in Chapter 16.40.8 of ODF 1.2 part2, page 306.
<cite>Marker geometry is defined by a svg:d attribute. </cite>
<cite>
The geometry is horizontally centered. It is vertically positioned relative to an offset value which is specified by a draw:marker-start-center attribute for markers referenced by a draw:marker-start attribute, and by the draw:marker-end-center attribute for markers referenced by a draw:marker-end attribute. The attribute value true defines an offset of 0.5 and the attribute value false defines an offset of 0.3, which is also the default value. The offset specifies the marker's vertical position in a range from 0.0 to 1.0, where the value 0.0 means the geometry's bottom bound is aligned to the X axis of the local coordinate system of the marker geometry, and where the value 1.0 means the top bound to be aligned to the X axis of the local coordinate system of the marker geometry.
</cite>

For example: <draw:marker draw:name="Arrow" svg:viewBox="0 0 20 30" svg:d="m10 0-10 30h20z"/> You get a symmetric triangle with the baseline from (0|30) to (20|30) and the top in (10|0). This is horizontally centered to baseline from (-10|30) to (10|30) with top in (0|0).

Now the questions:
(1) The offset of "0.3" for draw:marker-start-center="false" looks suspicious to me. I think it has to be either 0.0 or 1.0.

(2) Which coordinates got the triangle, if the offset would be 1.0?
LO has a parameter "fDockingPosition" in basegfx::tools::createAreaGeometryForLineStartEnd in /core/basegfx/source/polygon/b2dlinegeometry.cxx. This is called from create2DDecomposition in drawinglayer/source/primitive2d/polygonprimitive2d.cxx with 0.5 for "centered" and 0.0 for "not centered". So fDockingPosition equals 1.0- Offset?


And then the next two paragraphs in the spec:
<cite>If the marker referenced by a draw:marker-start attribute, the marker geometry is then rotated so that the Y axis is aligned with the direction of the stroke in the start/end point direction.</cite> <cite>If the marker is referenced by a draw:marker-end attribute, the marker geometry is then rotated so that the X axis is aligned with the direction of the stroke in the end/start point direction.</cite>

(3) In case "draw:marker-end" the marker has to be to aligned to Y axis too, same as in case "draw:marker-start" ?

Kind regards
Regina




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.