Class PageSize
java.lang.Object
de.erichseifert.vectorgraphics2d.util.PageSize
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final PageSizestatic final PageSizestatic final PageSizeprivate final doublestatic final PageSizestatic final PageSizestatic final PageSizeprivate static final doublestatic final PageSizeprivate final doubleprivate final doubleprivate final double -
Constructor Summary
ConstructorsConstructorDescriptionPageSize(double width, double height) PageSize(double x, double y, double width, double height) PageSize(Rectangle2D size) -
Method Summary
-
Field Details
-
MM_PER_INCH
private static final double MM_PER_INCH- See Also:
-
A3
-
A4
-
A5
-
LETTER
-
LEGAL
-
TABLOID
-
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
-
-
Method Details
-
getPortrait
-
getLandscape
-
getX
public double getX() -
getY
public double getY() -
getWidth
public double getWidth() -
getHeight
public double getHeight()
-