HasAnchor

o1.world.objects.HasAnchor
trait HasAnchor extends HasSize

A supertype for objects that have an anchoring point.

Attributes

Supertypes
trait HasSize
class Object
trait Matchable
class Any
Known subtypes

Members list

Inherited Not inherited +1
  • Not inherited
  • HasSize

Value members

Abstract methods

def anchor: Anchor

the object’s anchoring point

the object’s anchoring point

Concrete methods

Returns the Pos of the anchoring point within this object, expressed as coordinates relative to the object’s top left-hand corner.

Returns the Pos of the anchoring point within this object, expressed as coordinates relative to the object’s top left-hand corner.

Returns the x coordinate of the anchoring point within this object, relative to the object’s left edge.

Returns the x coordinate of the anchoring point within this object, relative to the object’s left edge.

Returns the y coordinate of the anchoring point within this object, relative to the object’s top edge.

Returns the y coordinate of the anchoring point within this object, relative to the object’s top edge.

Inherited methods

the location of this object’s center: the average point between its edges, expressed in coordinates relative to the object’s top left-hand corner

the location of this object’s center: the average point between its edges, expressed in coordinates relative to the object’s top left-hand corner

Inherited from:
HasSize
def height: Double

this object’s height: the distance from its top edge to its bottom edge

this object’s height: the distance from its top edge to its bottom edge

Inherited from:
HasSize
def width: Double

this object’s width: the distance from its left edge to its right edge

this object’s width: the distance from its left edge to its right edge

Inherited from:
HasSize