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.

trait Serializable
trait Product
trait Equals
trait Shape[Box]
trait Cloneable
trait SceneNode
class Object
trait Matchable
class Any

Type members

Inherited types

type Out = T
Inherited from:

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 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 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

Inherited from:
Inherited from:

Concrete fields

lazy val position: Point
lazy val size: Size