Difference between revisions of "Documentation/DevGuide/Drawings/Rotating and Shearing"
From Apache OpenOffice Wiki
< Documentation | DevGuide
OOoWikiBot (Talk | contribs) m (FINAL VERSION FOR L10N) |
|||
Line 25: | Line 25: | ||
|} | |} | ||
− | {{ | + | {{Note|Notice that the rotation works counter-clockwise, while shearing works clockwise.}} |
[[Image:RotationShearing.png|none|thumb|400px|Rotation and Shearing by 25 degrees]] | [[Image:RotationShearing.png|none|thumb|400px|Rotation and Shearing by 25 degrees]] |
Revision as of 16:24, 4 July 2018
Most shapes, except OLE and group objects, can be rotated and sheared. All of these objects include the com.sun.star.drawing.RotationDescriptor service that has the properties RotateAngle
and ShearAngle
.
Setting the com.sun.star.drawing.RotationDescriptor rotates or shears a shape:
Properties of com.sun.star.drawing.RotationDescriptor | |
---|---|
RotateAngle | long - This is the angle for rotation of this shape in 1/100th of a degree. The shape is rotated counter-clockwise around the center of the bounding box.
|
ShearAngle | long - This is the amount of shearing for this shape in 1/100th of a degree. The shape is sheared clockwise around the center of the bounding box.
|
The following example shows how a shape can be rotated by 25 degrees counterclockwise:
// xShape will be rotated by 25 degrees XPropertySet xPropSet = (XPropertySet)UnoRuntime.queryInterface( XPropertySet.class, xShape ); xPropSet.setPropertyValue( "RotateAngle", new Integer( 2500 ) );
Content on this page is licensed under the Public Documentation License (PDL). |