Class AnchorOffset

java.lang.Object
org.opencastproject.composer.layout.AnchorOffset

public final class AnchorOffset extends Object
The offset between the anchor points of two rectangular shapes.
  • Constructor Details

    • AnchorOffset

      public AnchorOffset(Anchor referenceAnchor, Anchor referringAnchor, Offset offset)
      Create a new offset.
      Parameters:
      referenceAnchor - anchor point of the reference shape
      referringAnchor - anchor point of the referring shape
      offset - offset between the two anchor points measured from the reference
  • Method Details

    • anchorOffset

      public static AnchorOffset anchorOffset(Anchor referenceAnchor, Anchor referringAnchor, int xOffset, int yOffset)
    • getReferenceAnchor

      public Anchor getReferenceAnchor()
      Get the anchor point of the reference shape.
    • getReferringAnchor

      public Anchor getReferringAnchor()
      Get the anchor point of the shape referring to the reference shape.
    • getOffset

      public Offset getOffset()
      Get the offset between the two anchor points.
    • equals

      public boolean equals(Object that)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object