Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CupShape

A PageShape subclass that is optimized for the most common case: a rectangle that becomes wider or narrower after a certain Y-position is reached. For example:

i1        i2              i1      i2
 +--------+                +------+
 |        |                |      |
 |        |       or       |      |
 +--+  +--+  y          +--+      |  y
    |  |                |         |
    +--+                +---------+
   i3  i4              i3         i4 (same as i2)

Hierarchy

  • CupShape

Index

Constructors

Constructors

constructor

  • new CupShape(i1: number, i2: number, y: number, i3: number, i4: number): CupShape
  • Creates a new CupShape that switches from insets i1, i2 to i3, i4 at Y-position y.

    Parameters

    • i1: number

      the left inset to use in the top part of the shape

    • i2: number

      the right inset to use in the top part of the shape

    • y: number

      the Y-coordinate at which the insets switch from top to bottom

    • i3: number

      the left inset to use in the bottom part of the shape

    • i4: number

      the right inset to use in the bottom part of the shape

    Returns CupShape