Class 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.
    • 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 class PageShape
      • 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 class PageShape