trait Anchor extends AnyRef
An Anchor
is a point where a two-dimensional object, such as a Pic, attaches to other
such objects; you can also think of it as a “pin” that attaches a Pic
to a background.
For instance, a Pic
may have its Anchor
at its center; the Pic
may then be attached
to a larger image at that image’s TopLeft
(another anchor), so that the center of the
first Pic
is located at the top left-hand corner of the second Pic
.
The companion object of this class provides several standard Anchor
s and
a class Anchor.Absolute
for creating new ones.
Anchor
objects are immutable.
This trait has an alias in the top-level package o1, so it’s accessible to students simply
via import o1._
.
- See also
- Alphabetic
- By Inheritance
- Anchor
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def internalXWithin(anchored: HasAnchor): Double
Returns the x coordinate of the anchoring point within the given
Pic
or other anchorable object, relative to the object’s left edge. - abstract def internalYWithin(anchored: HasAnchor): Double
Returns the y coordinate of the anchoring point within the given
Pic
or other anchorable object, relative to the object’s top edge.
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def internalPosWithin(anchored: HasAnchor): Pos
Returns the Pos of the anchoring point within the given
Pic
or other anchorable object, relative to the object’s top left-hand corner. - final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toAbsoluteWithin(anchored: HasAnchor): Absolute
Returns an absolute anchor the Pos of the anchoring point within the given
Pic
or other anchorable object, relative to the object’s top left-hand corner. - def toString: String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated @deprecated
- Deprecated
(Since version ) see corresponding Javadoc for more information.