O1Library Docs
Fall 2023
Docs API

# Anchor

o1.world.objects.Anchor$
See the Anchor companion trait
object Anchor

This companion object of class `Anchor` contains a number of standard anchors (`TopLeft`, `Center`, etc.) and a class for creating anchors in a custom location.

The object has an alias in the top-level package o1, so it’s accessible to students simply via `import o1.*`.

## Attributes

See also

  HasAnchor

Companion
  trait
Graph
Supertypes
  class Object
  trait Matchable
  class Any
Self type
  Anchor.type

## Members list

### Type members

#### Classlikes

final case class Absolute(deltaFromTopLeft: Pos) extends Anchor

An anchor at a custom Pos.

An anchor at a custom Pos.

## Parameters

deltaFromTopLeft

  the Pos of the anchor within the anchored object, relative to the object’s top left-hand corner

## Attributes

Supertypes
  trait Serializable
  trait Product
  trait Equals
  trait Anchor
  class Object
  trait Matchable
  class Any
  Show all

case object BottomCenter extends Anchor

An anchor at the middle of the bottom edge. This object has an alias in the top-level package o1, so it’s accessible to students simply via `import o1.*`.

An anchor at the middle of the bottom edge. This object has an alias in the top-level package o1, so it’s accessible to students simply via `import o1.*`.

## Attributes

Supertypes
  trait Singleton
  trait Product
  trait Mirror
  trait Serializable
  trait Product
  trait Equals
  trait Anchor
  class Object
  trait Matchable
  class Any
  Show all
Self type
  BottomCenter.type

case object BottomLeft extends Anchor

An anchor at the bottom left-hand corner. This object has an alias in the top-level package o1, so it’s accessible to students simply via `import o1.*`.

An anchor at the bottom left-hand corner. This object has an alias in the top-level package o1, so it’s accessible to students simply via `import o1.*`.

## Attributes

Supertypes
  trait Singleton
  trait Product
  trait Mirror
  trait Serializable
  trait Product
  trait Equals
  trait Anchor
  class Object
  trait Matchable
  class Any
  Show all
Self type
  BottomLeft.type

case object BottomRight extends Anchor

An anchor at the bottom right-hand corner. This object has an alias in the top-level package o1, so it’s accessible to students simply via `import o1.*`.

An anchor at the bottom right-hand corner. This object has an alias in the top-level package o1, so it’s accessible to students simply via `import o1.*`.

## Attributes

Supertypes
  trait Singleton
  trait Product
  trait Mirror
  trait Serializable
  trait Product
  trait Equals
  trait Anchor
  class Object
  trait Matchable
  class Any
  Show all
Self type
  BottomRight.type

case object Center extends Anchor

An anchor at the middle. This object has an alias in the top-level package o1, so it’s accessible to students simply via `import o1.*`.

An anchor at the middle. This object has an alias in the top-level package o1, so it’s accessible to students simply via `import o1.*`.

## Attributes

Supertypes
  trait Singleton
  trait Product
  trait Mirror
  trait Serializable
  trait Product
  trait Equals
  trait Anchor
  class Object
  trait Matchable
  class Any
  Show all
Self type
  Center.type

case object CenterLeft extends Anchor

An anchor at the middle of the left edge. This object has an alias in the top-level package o1, so it’s accessible to students simply via `import o1.*`.

An anchor at the middle of the left edge. This object has an alias in the top-level package o1, so it’s accessible to students simply via `import o1.*`.

## Attributes

Supertypes
  trait Singleton
  trait Product
  trait Mirror
  trait Serializable
  trait Product
  trait Equals
  trait Anchor
  class Object
  trait Matchable
  class Any
  Show all
Self type
  CenterLeft.type

case object CenterRight extends Anchor

An anchor at the middle of the right edge. This object has an alias in the top-level package o1, so it’s accessible to students simply via `import o1.*`.

An anchor at the middle of the right edge. This object has an alias in the top-level package o1, so it’s accessible to students simply via `import o1.*`.

## Attributes

Supertypes
  trait Singleton
  trait Product
  trait Mirror
  trait Serializable
  trait Product
  trait Equals
  trait Anchor
  class Object
  trait Matchable
  class Any
  Show all
Self type
  CenterRight.type

case object TopCenter extends Anchor

An anchor at the middle of the top edge. This object has an alias in the top-level package o1, so it’s accessible to students simply via `import o1.*`.

An anchor at the middle of the top edge. This object has an alias in the top-level package o1, so it’s accessible to students simply via `import o1.*`.

## Attributes

Supertypes
  trait Singleton
  trait Product
  trait Mirror
  trait Serializable
  trait Product
  trait Equals
  trait Anchor
  class Object
  trait Matchable
  class Any
  Show all
Self type
  TopCenter.type

case object TopLeft extends Anchor

An anchor at the top left-hand corner. This object has an alias in the top-level package o1, so it’s accessible to students simply via `import o1.*`.

An anchor at the top left-hand corner. This object has an alias in the top-level package o1, so it’s accessible to students simply via `import o1.*`.

## Attributes

Supertypes
  trait Singleton
  trait Product
  trait Mirror
  trait Serializable
  trait Product
  trait Equals
  trait Anchor
  class Object
  trait Matchable
  class Any
  Show all
Self type
  TopLeft.type

case object TopRight extends Anchor

An anchor at the top right-hand corner. This object has an alias in the top-level package o1, so it’s accessible to students simply via `import o1.*`.

An anchor at the top right-hand corner. This object has an alias in the top-level package o1, so it’s accessible to students simply via `import o1.*`.

## Attributes

Supertypes
  trait Singleton
  trait Product
  trait Mirror
  trait Serializable
  trait Product
  trait Equals
  trait Anchor
  class Object
  trait Matchable
  class Any
  Show all
Self type
  TopRight.type

### Givens

given derived$CanEqual: CanEqual[Anchor, Anchor]