OASIS Open Document Format for Office Applications (OpenDocument) TC

 View Only
  • 1.  Enhanced Path Shapes

    Posted 07-20-2011 04:40
    Hello, one of the Calligra developers working on enhanced path shapes found the following problem. Please let me know if you think it is a problem in the spec or the applications behaving differently then Calligra. ---------- Forwarded Message ---------- Subject: enhanced-shape and A,W and T, U command definitions Date: Tuesday, July 19, 2011, 09:30:59 From: Lukast dev <lukast.dev@gmail.com> To: "t.zachmann" <t.zachmann@zagge.de> Hello, I found two problems with definition of the enhanced-path commands in the office suits: Here is the spec http://docs.oasis-open.org/office/v1.2/cd05/OpenDocument-v1.2-cd05-part1.html#a_19_147_draw_enhanced-path First problem is about the "current point". When you build up a new shape that consists of N subpaths specified by enhanced path commands, and when you build the first subpath, you need "current point". That is not specified. I noticed that OOo and MS Office 2007 in the case of A (an B, W and V command) set the "current point" to the first point of the arc. But in calligra we set it to 0,0. What is the "current point" in the case of A, B, W and V command? A defintion: (x1, y1) and (x2, y2) is defining the bounding box of a ellipse. A line is then drawn from the current point to the start angle of the arc that is specified by the radial vector of point (x3, y3) and then counter clockwise to the end-angle that is specified by point (x4, y4). =========================== Second problem is with T and U. I noticed that OpenOffice and MS Office 2007 interpret the size of the ellipse w and h as major and minor radius. In calligra it is interpreted as width and height of the ellipse, so as major and minor diameter. T Draws a segment of an ellipse. The ellipse is specified by the center(x, y), the size(w, h) and the start-angle t0 in degrees and end-angle t1 in degrees. Let svg:viewbox be 0 0 21600 21600 So the ellipse looks like this in OOo and MS Office 2007: U 10800 10800 10800 10800 0 360 Z N But to be correct for calligra: U 10800 10800 21600 21600 0 360 Z N If calligra saves that odf, then the ellipse has double size in other suits. What is the specification saying? size is the radius or diameter? Best regards, Lukáš Tvrdý http://lukast.mediablog.sk/log ----------------------------------------- Some comments from me The current point in calligra is the point is not (0,0) but the point where the path is at the moment. For a new path that is 0,0. When I understand the spec correctly it means that the size is the bounding rect and that I interpret as diameter and not radius as done by other applications. Thorsten


  • 2.  Re: [office] Enhanced Path Shapes

    Posted 07-20-2011 13:31
    My "rule of thumb" is this: If a reader thinks that the text is unclear,
    then it is unclear. Something is only clear if we all agree it is clear
    and we also agree on what it means.

    So for questions like this, please enter them as issues in JIRA. If you
    have two problems then enter two JIRA issues:

    http://tools.oasis-open.org/issues/secure/CreateIssue!default.jspa

    Thanks!

    -Rob


    <thorsten.zachmann@nokia.com> wrote on 07/20/2011 12:39:55 AM:
    >
    > Hello,
    >
    > one of the Calligra developers working on enhanced path shapes found
    > the following problem. Please let me know if you think it is a
    > problem in the spec or the applications behaving differently then
    Calligra.
    >
    >
    > ---------- Forwarded Message ----------
    >
    >
    > Subject: enhanced-shape and A,W and T, U command definitions
    >
    > Date: Tuesday, July 19, 2011, 09:30:59
    >
    > From: Lukast dev <lukast.dev@gmail.com>
    >
    > To: "t.zachmann" <t.zachmann@zagge.de>
    >
    >
    > Hello, I found two problems with definition of the enhanced-path
    commands
    >
    > in the office suits:
    >
    >
    > Here is the spec
    >
    > http://docs.oasis-open.org/office/v1.2/cd05/OpenDocument-v1.2-cd05-
    > part1.html#a_19_147_draw_enhanced-path
    >
    >
    > First problem is about the "current point".
    >
    > When you build up a new shape that consists of N subpaths specified by
    >
    > enhanced path commands,
    >
    > and when you build the first subpath, you need "current point". That
    >
    > is not specified.
    >
    > I noticed that OOo and MS Office 2007 in the case of A (an B, W and V
    command)
    >
    > set the "current point" to the first point of the arc. But in calligra
    >
    > we set it to 0,0.
    >
    >
    > What is the "current point" in the case of A, B, W and V command?
    >
    >
    > A defintion:
    >
    > (x1, y1) and (x2, y2) is defining the bounding box of a ellipse. A
    >
    > line is then drawn from the current point to the start angle of the
    >
    > arc that is specified by the radial vector of point (x3, y3) and then
    >
    > counter clockwise to the end-angle that is specified by point (x4,
    >
    > y4).
    >
    >
    > ===========================
    >
    >
    > Second problem is with T and U.
    >
    > I noticed that OpenOffice and MS Office 2007 interpret the size of the
    >
    > ellipse w and h as major and minor radius.
    >
    > In calligra it is interpreted as width and height of the ellipse, so
    >
    > as major and minor diameter.
    >
    >
    > T
    >
    > Draws a segment of an ellipse. The ellipse is specified by the
    >
    > center(x, y), the size(w, h) and the start-angle t0 in degrees and
    >
    > end-angle t1 in degrees.
    >
    >
    > Let svg:viewbox be 0 0 21600 21600
    >
    >
    > So the ellipse looks like this in OOo and MS Office 2007:
    >
    > U 10800 10800 10800 10800 0 360 Z N
    >
    >
    > But to be correct for calligra:
    >
    > U 10800 10800 21600 21600 0 360 Z N
    >
    >
    > If calligra saves that odf, then the ellipse has double size in other
    suits.
    >
    >
    > What is the specification saying? size is the radius or diameter?
    >
    >
    > Best regards,
    >
    > Lukáš Tvrdý http://lukast.mediablog.sk/log
    >
    >
    >
    > -----------------------------------------
    >
    > Some comments from me
    >
    > The current point in calligra is the point is not (0,0) but the
    > point where the path is at the moment. For a new path that is 0,0.
    > When I understand the spec correctly it means that the size is the
    > bounding rect and that I interpret as diameter and not radius as
    > done by other applications.
    >
    > Thorsten
    >
    >
    > ---------------------------------------------------------------------
    > To unsubscribe from this mail list, you must leave the OASIS TC that
    > generates this mail. Follow this link to all your TCs in OASIS at:
    > https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php
    >