Graphic

indigo.shared.scenegraph.Graphic
See theGraphic companion object
final case class Graphic[M <: Material](material: M, crop: Rectangle, eventHandlerEnabled: Boolean, eventHandler: ((Graphic[_], GlobalEvent)) => Option[GlobalEvent], position: Point, rotation: Radians, scale: Vector2, depth: Depth, ref: Point, flip: Flip) extends RenderNode[Graphic[M]], Cloneable, SpatialModifiers[Graphic[M]]

Graphics are used to draw images on the screen, in a cheap efficient but expressive way. Graphic's party trick is it's ability to crop images.

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Cloneable
trait RenderNode[Graphic[M]]
trait SceneNode
class Object
trait Matchable
class Any
Show all

Members list

Type members

Inherited types

type Out = T

Attributes

Inherited from:
RenderNode

Value members

Concrete methods

def flipHorizontal(isFlipped: Boolean): Graphic[M]
def flipVertical(isFlipped: Boolean): Graphic[M]
def modifyMaterial[MB <: Material](alter: M => MB): Graphic[MB]
def moveBy(pt: Point): Graphic[M]
def moveBy(x: Int, y: Int): Graphic[M]
def moveTo(pt: Point): Graphic[M]
def moveTo(x: Int, y: Int): Graphic[M]
def onEvent(f: PartialFunction[(Graphic[_], GlobalEvent), GlobalEvent]): Graphic[M]
def rotateBy(angle: Radians): Graphic[M]
def rotateTo(angle: Radians): Graphic[M]
def scaleBy(amount: Vector2): Graphic[M]
def scaleBy(x: Double, y: Double): Graphic[M]
def transformBy(positionDiff: Point, rotationDiff: Radians, scaleDiff: Vector2): Graphic[M]
def transformTo(newPosition: Point, newRotation: Radians, newScale: Vector2): Graphic[M]
def withCrop(newCrop: Rectangle): Graphic[M]
def withCrop(x: Int, y: Int, width: Int, height: Int): Graphic[M]
def withDepth(newDepth: Depth): Graphic[M]
def withEventHandler(f: ((Graphic[_], GlobalEvent)) => Option[GlobalEvent]): Graphic[M]
def withFlip(newFlip: Flip): Graphic[M]
def withMaterial[MB <: Material](newMaterial: MB): Graphic[MB]
def withPosition(newPosition: Point): Graphic[M]
def withRef(newRef: Point): Graphic[M]
def withRef(x: Int, y: Int): Graphic[M]
def withRotation(newRotation: Radians): Graphic[M]
def withScale(newScale: Vector2): Graphic[M]

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product

Concrete fields

lazy val size: Size
lazy val x: Int
lazy val y: Int