OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

opendocument-users message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [opendocument-users] draw:transform issues

On Fri, Jan 20, 2006 at 09:59:13AM -0800, Jon Ferraiolo wrote:
> See http://www.w3.org/TR/SVG11/coords.html#TransformAttribute.

Thanks. I am aware that the SVG transform element was the original basis
for the OpenDocument attribute. That much is obvious from looking at the
documentation. But the OpenDocument transform element uses the "draw"
namespace (1) whereas most "SVG-compatible" attributes use the "svg"
namespace (2), so I can only assume that the TC felt there significant
semantic differences. I just with they would have documented them :-)

  (1) urn:oasis:names:tc:opendocument:xmlns:drawing:1.0
  (2) urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0

FYI draw:transform also does not allow a center of rotation--you must do
the transform/rotate/transform yourself:

  "rotate(<rotate-angle>), which specifies a rotation by <rotate-angle>
   about the origin of the shapes [sic] coordinate system."

After playing around with this more, this statement has issues too. For
one thing, shapes are always specified in absolute coordinates, so the
origin of the coordinate system should be the origin of the page, which
will always be (0, 0). But that is not what OpenOffice does. I do not
really know *what* OpenOffice does, but whatever it is I don't think it
is supported by the spec. If I had to guess it looks like it is
independently rotating the shape around its upper-left corner, and then
rotating the position of the shape around the page origin (but in the
opposite direction). Paste these into a document to see for yourself:

  <draw:rect svg:width="1in" svg:height="1in" draw:transform="rotate(.1)"/>
  <draw:rect svg:width="1in" svg:height="1in" draw:transform="rotate(.2)"/>
  <draw:rect svg:width="1in" svg:height="1in" draw:transform="rotate(.3)"/>
  <draw:rect svg:width="1in" svg:height="1in" draw:transform="rotate(.4)"/>
  <draw:rect svg:x="2in" svg:width="1in" svg:height="1in" draw:transform="rotate(.1)"/>
  <draw:rect svg:x="2in" svg:width="1in" svg:height="1in" draw:transform="rotate(.2)"/>
  <draw:rect svg:x="2in" svg:width="1in" svg:height="1in" draw:transform="rotate(.3)"/>
  <draw:rect svg:x="2in" svg:width="1in" svg:height="1in" draw:transform="rotate(.4)"/>
  <draw:rect svg:x="4in" svg:width="1in" svg:height="1in" draw:transform="rotate(.1)"/>
  <draw:rect svg:x="4in" svg:width="1in" svg:height="1in" draw:transform="rotate(.2)"/>
  <draw:rect svg:x="4in" svg:width="1in" svg:height="1in" draw:transform="rotate(.3)"/>
  <draw:rect svg:x="4in" svg:width="1in" svg:height="1in" draw:transform="rotate(.4)"/>  


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]