DrawingLayout Class
Represents location, size and transformations (flipping and rotation) of the bounding box enclosing the drawing.
- Inheritance:
- System.ObjectDrawingLayout
Properties
FlipHorizontal
Gets or sets a value indicating whether to flip the drawing horizontally - reflect it across a vertical line that intersects the center of the drawing's bounding box.
Property Value
- System.Boolean
true to flip the drawing horizontally; otherwise, false.
Remarks
When set to a value different than the current FlipHorizontal, MS PowerPoint automatically inverts the Rotation to 360° - Rotation (normalized to the interval [0°, 360°>). To follow the MS PowerPoint's behavior, you should do the same or simply use the FlipHorizontally() method.
FlipVertical
Gets or sets a value indicating whether to flip the drawing vertically - reflect it across a horizontal line that intersects the center of the drawing's bounding box.
Property Value
- System.Boolean
true to flip the drawing horizontally; otherwise, false.
Remarks
When set to a value different than the current FlipVertical, MS PowerPoint automatically inverts the Rotation to 360° - Rotation (normalized to the interval [0°, 360°>). To follow the MS PowerPoint's behavior, you should do the same or simply use the FlipVertically() method.
Height
Gets or sets the height of the bounding box enclosing the drawing (prior to any rotation or flipping).
Property Value
The height of the bounding box enclosing the drawing (prior to any rotation or flipping).
Exceptions
- System.ArgumentOutOfRangeException
Value is less than zero.
Left
Gets or sets the location of the left edge of the bounding box enclosing the drawing relative to the left edge of the slide on which the drawing is located (prior to any rotation or flipping).
Property Value
The location of the left edge of the bounding box enclosing the drawing relative to the left edge of the slide on which the drawing is located (prior to any rotation or flipping).
Rotation
Gets or sets the amount (in degrees) by which the drawing is rotated clockwise about the center of the drawing's bounding box.
Property Value
- System.Double
The amount (in degrees) by which the drawing is rotated clockwise about the center of the drawing's bounding box.
Top
Gets or sets the location of the top edge of the bounding box enclosing the drawing relative to the top edge of the slide on which the drawing is located (prior to any rotation or flipping).
Property Value
The location of the top edge of the bounding box enclosing the drawing relative to the top edge of the slide on which the drawing is located (prior to any rotation or flipping).
Width
Gets or sets the width of the bounding box enclosing the drawing (prior to any rotation or flipping).
Property Value
The width of the bounding box enclosing the drawing (prior to any rotation or flipping).
Exceptions
- System.ArgumentOutOfRangeException
Value is less than zero.
Methods
FlipHorizontally()
Inverts the value of the FlipHorizontal.
The Rotation is also inverted to 360° - Rotation (normalized to the interval [0°, 360°>) like in MS PowerPoint.
Returns
A reference to this instance after the flipping operation has completed.
FlipVertically()
Inverts the value of the FlipVertical.
The Rotation is also inverted to 360° - Rotation (normalized to the interval [0°, 360°>) like in MS PowerPoint.
Returns
A reference to this instance after the flipping operation has completed.
Set(Double, Double, Double, Double, LengthUnit)
Sets the position and the size of the drawing (rotation and flipping are removed).
public void Set(double left, double top, double width, double height, LengthUnit unit)
Public Sub Set(left As Double, top As Double, width As Double, height As Double, unit As LengthUnit)
Parameters
left
- System.Double
The location of the left edge of the bounding box enclosing the drawing relative to the left edge of the slide on which the drawing is located (prior to any rotation or flipping).
top
- System.Double
The location of the top edge of the bounding box enclosing the drawing relative to the top edge of the slide on which the drawing is located (prior to any rotation or flipping).
width
- System.Double
The width of the bounding box enclosing the drawing (prior to any rotation or flipping).
height
- System.Double
The height of the bounding box enclosing the drawing (prior to any rotation or flipping).
unit
- LengthUnit
The measurement unit for left
, top
, width
and height
parameters.