Possible values for the orientation of a shape.
[Visual Basic]
Public Enum FlipOrientation
[C#]public enum FlipOrientation
Remarks
Example
Creates two line shapes. One line goes from top left to bottom right. Another line goes from bottom left to top right.
[C#]
Document doc = new Document();
// The lines will cros the whole page.
float pageWidth = (float)doc.FirstSection.PageSetup.PageWidth;
float pageHeight= (float)doc.FirstSection.PageSetup.PageHeight;
// This line goes from top left to bottom right by default.
Shape lineA = new Shape(doc, ShapeType.Line);
lineA.Bounds = new RectangleF(0, 0, pageWidth, pageHeight);
lineA.RelativeHorizontalPosition = RelativeHorizontalPosition.Page;
lineA.RelativeVerticalPosition = RelativeVerticalPosition.Page;
doc.FirstSection.Body.FirstParagraph.AppendChild(lineA);
// This line goes from bottom left to top right because we flipped it.
Shape lineB = new Shape(doc, ShapeType.Line);
lineB.Bounds = new RectangleF(0, 0, pageWidth, pageHeight);
lineB.FlipOrientation = FlipOrientation.Horizontal;
lineB.RelativeHorizontalPosition = RelativeHorizontalPosition.Page;
lineB.RelativeVerticalPosition = RelativeVerticalPosition.Page;
doc.FirstSection.Body.FirstParagraph.AppendChild(lineB);
doc.Save(MyDir + "Shape.LineFlipOrientation Out.doc");
[Visual Basic]
Dim doc As Document = New Document()
' The lines will cros the whole page.
Dim pageWidth As Single = CSng(doc.FirstSection.PageSetup.PageWidth)
Dim pageHeight As Single= CSng(doc.FirstSection.PageSetup.PageHeight)
' This line goes from top left to bottom right by default.
Dim lineA As Shape = New Shape(doc, ShapeType.Line)
lineA.Bounds = New RectangleF(0, 0, pageWidth, pageHeight)
lineA.RelativeHorizontalPosition = RelativeHorizontalPosition.Page
lineA.RelativeVerticalPosition = RelativeVerticalPosition.Page
doc.FirstSection.Body.FirstParagraph.AppendChild(lineA)
' This line goes from bottom left to top right because we flipped it.
Dim lineB As Shape = New Shape(doc, ShapeType.Line)
lineB.Bounds = New RectangleF(0, 0, pageWidth, pageHeight)
lineB.FlipOrientation = FlipOrientation.Horizontal
lineB.RelativeHorizontalPosition = RelativeHorizontalPosition.Page
lineB.RelativeVerticalPosition = RelativeVerticalPosition.Page
doc.FirstSection.Body.FirstParagraph.AppendChild(lineB)
doc.Save(MyDir & "Shape.LineFlipOrientation Out.doc")
Members
| Member Name | Description | Value |
| None | Coordinates are not flipped. | 0 |
| Horizontal | Flip along the y-axis, reversing the x-coordinates. | 1 |
| Vertical | Flip along the x-axis, reversing the y-coordinates. | 2 |
| Both | Flip along both the y- and x-axis. | 3 |
Requirements
Namespace: Aspose.Words.Drawing
Assembly: Aspose.Words (in Aspose.Words.dll)
See Also
Aspose.Words.Drawing Namespace | FlipOrientation