Regina Henschel schrieb:
Hi Armin,
Armin Le Grand schrieb:
Regina Henschel schrieb:
Hi Armin,
Armin Le Grand schrieb:
Regina Henschel schrieb:
Hi Armin,
<----stuff deleted---->
If I save the file and unpack it, the rectangle has
<draw:rect draw:style-name="gr1" draw:text-style-name="P1"
draw:layer="layout" svg:width="2cm" svg:height="2cm"
draw:transform="skewX (0.3490658503988) translate (-0.636cm -1cm)">
There is no matrix.
Oops, forgot: draw:transform is the matrix. Please refer to ODF format
definitions to see that this can be given directly as 3x2 values, but
also in the more readable form above. Since XML is about readability,
the most readable form is used.
I meant the value matrix(<a> <b> <c> <d> <e> <f>) from the ODF spec.
But there are problems for me. Is this a description for the full matrix
<a> <b> <c>
<d> <e> <f>
0 0 1
?
Simply refer to ODF1.2 spec, it's documented there. It says, <c>, <f>
build the translation, thus Your interpretation should be correct.
OK. I have found it. The part "where the right column (<c>, <f>)
describes the translation" is new in v1.2 and is not in v1.1.
I have tried something like
<draw:circle draw:name="vonOOodirekt" draw:style-name="gr1"
draw:text-style-name="P1" draw:layer="layout" svg:width="3cm"
svg:height="3cm" draw:transform="translate (6.5cm 7.51cm)"
draw:kind="section" draw:start-angle="0" draw:end-angle="270">
<text:p/>
</draw:circle>
<draw:circle draw:name="meins" draw:style-name="gr1"
draw:text-style-name="P1" draw:layer="layout" svg:width="3cm"
svg:height="3cm" draw:transform="matrix(0 1 10 -1 0 10) translate
(6.5cm 7.51cm)" draw:kind="section" draw:start-angle="0"
draw:end-angle="270">
<text:p/>
</draw:circle>
I expect a rotating and a little shift, but get a large shearing. So
for me there is again the question, do I miss-understand something or
is OOo wrong here.
Hard to say, i would also have to evaluate the code by tracing through
XML parser, API and Drawinglayer. I can say that the API uses the
Drawinglayer TRSetBaseGeometry when a matrix has to be set, but in which
order or with which effects this happens is nothing i just know.
I have found the mapping a <-> 0,0; b <-> 1,0; c <-> 0,1; d <-> 1,1; e
<-> 0,2; f <-> 1,2 in class SdXMLImExTransform2D in xexptran.cxx around
lines 470 and 620. This seems to be wrong then, because (<c>,<f>) is not
a column here, but that mapping results in the matrix
a c e
b d f
0 0 1
That gives in my example
0 10 0
1 -1 10
0 0 1
which results in shearing.
Since in the XML above is no shear, it should be an error somewhere when
it leads to shear after loading. OTOH when You write a ahape with shear
and load it, it works, thus there has to be at least a simple
combination which works.
Yes, with OOo's own documents there are no problems. Does it write a
matrix() value at all?
Shall I write an issue for the wrong mapping?
No, please write an issue (to CL, i think) about a wrong description in
the ODF documentation. We can change/correct the documentation, but not
millions of ODF files out there.
And another question: How should svg width/height work together with
the transformation? First scale with svg and then transform or the
other way round?
I am not sure, i would have to check the code, too.
I will have to take some time to check this. These are questions who's
answering spans various areas in the code not a single person is
responsible for.
That can wait. My questions took already so much time for you. I hope,
that I will be able after a while, to do some coding, so that the effort
pays off.
You are welcome :-)
kind regards
Regina
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]