Box

indigo.shared.scenegraph.Shape.Box
See theBox companion object
final case class Box(dimensions: Rectangle, fill: Fill, stroke: Stroke, lighting: LightingModel, eventHandlerEnabled: Boolean, eventHandler: ((Box, GlobalEvent)) => Option[GlobalEvent], rotation: Radians, scale: Vector2, depth: Depth, ref: Point, flip: Flip, shaderId: Option[ShaderId]) extends Shape[Box]

Draws a coloured box that occupies a rectangle on the screen.

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Shape[Box]
trait Cloneable
trait RenderNode[Box]
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): Box
def flipVertical(isFlipped: Boolean): Box
def modifyFill(modifier: Fill => Fill): Box
def modifyStroke(modifier: Stroke => Stroke): Box
def moveBy(pt: Point): Box
def moveBy(x: Int, y: Int): Box
def moveTo(pt: Point): Box
def moveTo(x: Int, y: Int): Box
def onEvent(f: PartialFunction[(Box, GlobalEvent), GlobalEvent]): Box
def resize(size: Size): Box
def rotateBy(angle: Radians): Box
def rotateTo(angle: Radians): Box
def scaleBy(amount: Vector2): Box
def scaleBy(x: Double, y: Double): Box
def transformBy(positionDiff: Point, rotationDiff: Radians, scaleDiff: Vector2): Box
def transformTo(newPosition: Point, newRotation: Radians, newScale: Vector2): Box
def withDepth(newDepth: Depth): Box
def withDimensions(newDimensions: Rectangle): Box
def withEventHandler(f: ((Box, GlobalEvent)) => Option[GlobalEvent]): Box
def withFill(newFill: Fill): Box
def withFlip(newFlip: Flip): Box
def withLighting(newLighting: LightingModel): Box
def withPosition(newPosition: Point): Box
def withRef(newRef: Point): Box
def withRef(x: Int, y: Int): Box
def withRotation(newRotation: Radians): Box
def withScale(newScale: Vector2): Box
def withShaderId(newShaderId: ShaderId): Box
def withStroke(newStroke: Stroke): Box
def withStrokeColor(newStrokeColor: RGBA): Box
def withStrokeWidth(newWidth: Int): Box

Inherited methods

Attributes

Inherited from:
Shape
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product

Concrete fields

lazy val position: Point
lazy val size: Size