Compartilhar via


BodyProperties.Rotation Property

Rotation.Represents the attribte in schema: rot

Namespace:  DocumentFormat.OpenXml.Drawing
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
<SchemaAttrAttribute(, "rot")> _
Public Property Rotation As Int32Value
    Get
    Set
'Usage
Dim instance As BodyProperties
Dim value As Int32Value

value = instance.Rotation

instance.Rotation = value
[SchemaAttrAttribute(, "rot")]
public Int32Value Rotation { get; set; }

Property Value

Type: DocumentFormat.OpenXml.Int32Value
Returns Int32Value.

Remarks

The following information from the ECMA International Standard ECMA-376 can be useful when working with this class.

Specifies the rotation that is being applied to the text within the bounding box. If it not specified, the rotation of the accompanying shape is used. If it is specified, then this is applied independently from the shape. That is the shape can have a rotation applied in addition to the text itself having a rotation applied to it. If this attribute is omitted, then a value of 0 is implied.

Consider the case where a shape has a rotation of 5400000, meaning 90 degrees clockwise, applied to it. In addition to this, the text body itself has a rotation of 5400000, or 90 degrees counter-clockwise, applied to it. Then the resulting shape would appear to be rotated but the text within it would appear as though it had not been rotated at all. The DrawingML specifying this would look like the following:

<p:sp>
  <p:spPr>
    <a:xfrm rot="5400000">
      …
    </a:xfrm>
  </p:spPr>
  …
  <p:txBody>
    <a:bodyPr rot="-5400000" … />
    …
    (Some text)
    …
  </p:txBody>
</p:sp>

The possible values for this attribute are defined by the ST_Angle simple type.

See Also

Reference

BodyProperties Class

BodyProperties Members

DocumentFormat.OpenXml.Drawing Namespace