Enum JoinType

java.lang.Object
java.lang.Enum<JoinType>
com.github.micycle1.clipper2.offset.JoinType
All Implemented Interfaces:
Serializable, Comparable<JoinType>, java.lang.constant.Constable

public enum JoinType extends Enum<JoinType>
The JoinType enumerator is only needed when offsetting (inflating/shrinking). It isn't needed for polygon clipping.

When adding paths to a ClipperOffset object via the AddPaths method, the joinType parameter may be any one of these types - Square, Round, Miter, or Round.

  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Bevelled joins are similar to 'squared' joins except that squaring won't occur at a fixed distance.
    Edges are first offset a specified distance away from and parallel to their original (ie starting) edge positions.
    Rounding is applied to all convex joins with the arc radius being the offset distance, and the original join vertex the arc center.
    Convex joins will be truncated using a 'squaring' edge.
  • Method Summary

    Modifier and Type
    Method
    Description
    static JoinType
    Returns the enum constant of this type with the specified name.
    static JoinType[]
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • Square

      public static final JoinType Square
      Convex joins will be truncated using a 'squaring' edge. And the mid-points of these squaring edges will be exactly the offset distance away from their original (or starting) vertices.
    • Round

      public static final JoinType Round
      Rounding is applied to all convex joins with the arc radius being the offset distance, and the original join vertex the arc center.
    • Miter

      public static final JoinType Miter
      Edges are first offset a specified distance away from and parallel to their original (ie starting) edge positions. These offset edges are then extended to points where they intersect with adjacent edge offsets. However a limit must be imposed on how far mitered vertices can be from their original positions to avoid very convex joins producing unreasonably long and narrow spikes). To avoid unsightly spikes, joins will be 'squared' wherever distances between original vertices and their calculated offsets exceeds a specified value (expressed as a ratio relative to the offset distance).
    • Bevel

      public static final JoinType Bevel
      Bevelled joins are similar to 'squared' joins except that squaring won't occur at a fixed distance. While bevelled joins may not be as pretty as squared joins, bevelling is much easier (ie faster) than squaring. And perhaps this is why bevelling rather than squaring is preferred in numerous graphics display formats (including SVG and PDF document formats).
  • Method Details

    • values

      public static JoinType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static JoinType valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null