Class PageSize

java.lang.Object
de.erichseifert.vectorgraphics2d.util.PageSize

public class PageSize extends Object

Class that represents a page with a specified origin and size. The class is immutable and can be initialized with coordinates and dimensions or only dimensions:

PageSize a3 = new PageSize(0.0, 0.0, 297.0, 420.0);
PageSize a4 = new PageSize(210.0, 297.0);

For convenience the class contains static constants for common page sizes:

PageSize a4 = PageSize.A4;
PageSize letter = PageSize.LETTER;
  • Field Details

    • MM_PER_INCH

      private static final double MM_PER_INCH
      See Also:
    • A3

      public static final PageSize A3
    • A4

      public static final PageSize A4
    • A5

      public static final PageSize A5
    • LETTER

      public static final PageSize LETTER
    • TABLOID

      public static final PageSize TABLOID
    • LEDGER

      public static final PageSize LEDGER
    • x

      private final double x
    • y

      private final double y
    • width

      private final double width
    • height

      private final double height
  • Constructor Details

    • PageSize

      public PageSize(double x, double y, double width, double height)
    • PageSize

      public PageSize(double width, double height)
    • PageSize

      public PageSize(Rectangle2D size)
  • Method Details

    • getPortrait

      public PageSize getPortrait()
    • getLandscape

      public PageSize getLandscape()
    • getX

      public double getX()
    • getY

      public double getY()
    • getWidth

      public double getWidth()
    • getHeight

      public double getHeight()