Class FlipOrientation

  • java.lang.Object
    • com.aspose.words.FlipOrientation
public class FlipOrientation 
extends java.lang.Object

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


Shows how to create line shapes and set specific location and size.
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));

// 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));

Assert.assertEquals(new Rectangle2D.Float(0f, 0f, pageWidth, pageHeight), lineB.getBoundsInPoints());

// Add lines to the document.
doc.getFirstSection().getBody().getFirstParagraph().appendChild(lineA); + "Shape.LineFlipOrientation.doc");
See Also:

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.