com.aspose.words
Class FlipOrientation

java.lang.Object
    extended by com.aspose.words.FlipOrientation

public class FlipOrientation 
extends java.lang.Object

Utility class containing constants. Possible values for the orientation of a shape.

Example:

Creates two line shapes. One line goes from top left to bottom right. Another line goes from bottom left to top right.
Document doc = new Document();

// The lines will cross the whole page.
float pageWidth = (float)doc.getFirstSection().getPageSetup().getPageWidth();
float pageHeight = (float)doc.getFirstSection().getPageSetup().getPageHeight();

// This line goes from top left to bottom right by default.
Shape lineA = new Shape(doc, ShapeType.LINE);
lineA.setBounds(new Rectangle2D.Float(0, 0, pageWidth, pageHeight));
lineA.setRelativeHorizontalPosition(RelativeHorizontalPosition.PAGE);
lineA.setRelativeVerticalPosition(RelativeVerticalPosition.PAGE);
doc.getFirstSection().getBody().getFirstParagraph().appendChild(lineA);

// This line goes from bottom left to top right because we flipped it.
Shape lineB = new Shape(doc, ShapeType.LINE);
lineB.setBounds(new Rectangle2D.Float(0, 0, pageWidth, pageHeight));
lineB.setFlipOrientation(FlipOrientation.HORIZONTAL);
lineB.setRelativeHorizontalPosition(RelativeHorizontalPosition.PAGE);
lineB.setRelativeVerticalPosition(RelativeVerticalPosition.PAGE);
doc.getFirstSection().getBody().getFirstParagraph().appendChild(lineB);

doc.save(getMyDir() + "Shape.LineFlipOrientation Out.doc");
See Also:
ShapeBase.FlipOrientation

Field Summary
static final intNONE = 0
           Coordinates are not flipped.
static final intHORIZONTAL = 1
           Flip along the y-axis, reversing the x-coordinates.
static final intVERTICAL = 2
           Flip along the x-axis, reversing the y-coordinates.
static final intBOTH = 3
           Flip along both the y- and x-axis.
 

Field Detail

NONE = 0

public static final int NONE
Coordinates are not flipped.

HORIZONTAL = 1

public static final int HORIZONTAL
Flip along the y-axis, reversing the x-coordinates.

VERTICAL = 2

public static final int VERTICAL
Flip along the x-axis, reversing the y-coordinates.

BOTH = 3

public static final int BOTH
Flip along both the y- and x-axis.

See Also:
          Aspose.Words Documentation - the home page for the Aspose.Words Product Documentation.
          Aspose.Words Support Forum - our preferred method of support.