Hello. I'm Korean University sutudent.
I study opensource. And OpenOffice.org is very interesting for me.
I have a question.
I guess that the result of the following source is 100, but the actual
result is 101. what is the reason?
Please assistance for me.
//------------------------------------ ObjectTransformationDemo.java
(DeveloperGuide example) -------------
xDrawDoc = Helper.createDocument( xOfficeContext,
"private:factory/simpress", "_blank", 0, pPropValues );
XDrawPage xPage = PageHelper.getDrawPageByIndex( xDrawDoc, 0 );
XPropertySet xPagePropSet= (XPropertySet)
UnoRuntime.queryInterface( XPropertySet.class, xPage );
XShapes xShapes = (XShapes)
UnoRuntime.queryInterface( XShapes.class, xPage );
XShape xShape = ShapeHelper.createShape( xDrawDoc,
new Point( 0, 0 ), new Size( 100, 100
), // Size is 100, 100
drawing.RectangleShape" );
xShapes.add( xShape );
XPropertySet xPropSet = (XPropertySet)
UnoRuntime.queryInterface( XPropertySet.class, xShape );
HomogenMatrix3 aHomogenMatrix3 = (HomogenMatrix3)
xPropSet.getPropertyValue( "Transformation" );
java.awt.geom.AffineTransform aOriginalMatrix =
new java.awt.geom.AffineTransform(
aHomogenMatrix3.Line1.Column1,
aHomogenMatrix3.Line2.Column1,
aHomogenMatrix3.Line1.Column2, aHomogenMatrix3.Line2.Column2,
aHomogenMatrix3.Line1.Column3,
aHomogenMatrix3.Line2.Column3 );
System.out.println(aHomogenMatrix3.Line1.Column1 +",\t"+
aHomogenMatrix3.Line1.Column2 + ",\t" +
aHomogenMatrix3.Line1.Column3); // Here
System.out.println(aHomogenMatrix3.Line2.Column1 +",\t"+
aHomogenMatrix3.Line2.Column2 + ",\t" +
aHomogenMatrix3.Line2.Column3); //Here
//-------------------------------------------------------------------------
result
-----------------------------------------------------------------------
101.0, 0.0, 0.0
0.0, 101.0, 0.0