Package ca.cgjennings.layout
Class PageShape.MergedShape
- java.lang.Object
-
- ca.cgjennings.layout.PageShape
-
- ca.cgjennings.layout.PageShape.MergedShape
-
- Enclosing class:
- PageShape
public static class PageShape.MergedShape extends PageShape
A shape that merges two source shapes into a single shape. The resulting shape always uses the narrowest margin of the two source shapes at any given Y-position. For example, to ensure that a shape never has a negative inset (making the text wider than the requested rectangle), merge it with PageShape.RECTANGLE_SHAPE.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ca.cgjennings.layout.PageShape
PageShape.CompoundShape, PageShape.CupShape, PageShape.GeometricShape, PageShape.InsetShape, PageShape.MergedShape
-
-
Field Summary
-
Fields inherited from class ca.cgjennings.layout.PageShape
RECTANGLE_SHAPE
-
-
Constructor Summary
Constructors Constructor Description MergedShape(PageShape shape1, PageShape shape2)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getLeftInset(double y1, double y2)
Return the narrowest (maximum) left edge inset between y1 and y2.double
getRightInset(double y1, double y2)
Return the narrowest (maximum) right edge inset between y1 and y2.
-
-
-
Method Detail
-
getLeftInset
public double getLeftInset(double y1, double y2)
Description copied from class:PageShape
Return the narrowest (maximum) left edge inset between y1 and y2. y1 must be <= y2.- Overrides:
getLeftInset
in classPageShape
-
getRightInset
public double getRightInset(double y1, double y2)
Description copied from class:PageShape
Return the narrowest (maximum) right edge inset between y1 and y2. y1 must be <= y2.- Overrides:
getRightInset
in classPageShape
-
-