Package playn.scene
Class ClippedLayer
java.lang.Object
playn.scene.Layer
playn.scene.ClippedLayer
- All Implemented Interfaces:
AutoCloseable
,Closeable
- Direct Known Subclasses:
GroupLayer
A layer whose rendering is (usually) clipped to a rectangle. The clipping rectangle is defined
to be the layer's
x, y
coordinate (as adjusted by its origin) extended to the layer's
scaled width and height.
NOTE: clipping rectangles cannot be rotated. If the layer has a rotation, the clipping region will be undefined (and most certainly wacky).
-
Nested Class Summary
Nested classes/interfaces inherited from class playn.scene.Layer
Layer.HitTester, Layer.Origin, Layer.State, Layer.Visitor
Nested classes/interfaces inherited from interface react.Closeable
Closeable.Set, Closeable.Util
-
Field Summary
Fields inherited from class playn.scene.Layer
DEBUG_RECTS, state
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfloat
height()
Returns the height of this layer.setHeight
(float height) Updates the height of this group layer, and hence its clipping rectangle.setSize
(float width, float height) Updates the size of this clipped layer, and hence its clipping rectangle.setSize
(IDimension size) Updates the size of this clipped layer, and hence its clipping rectangle.setWidth
(float width) Updates the width of this group layer, and hence its clipping rectangle.float
width()
Returns the width of this layer.Methods inherited from class playn.scene.Layer
absorbHits, alpha, close, debugPrint, depth, disposed, events, hasEventListeners, hitTest, hitTestDefault, interactive, name, onAdded, onDisposed, onRemoved, origin, origin, originX, originY, paint, parent, rotation, scale, scaledHeight, scaledWidth, scaleX, scaleY, setAlpha, setBatch, setDepth, setHitTester, setInteractive, setName, setOrigin, setOrigin, setRotation, setScale, setScale, setScaleX, setScaleY, setTint, setTranslation, setTranslation, setTx, setTy, setVisible, tint, toString, transform, translation, translation, tx, ty, visible, visit
-
Constructor Details
-
ClippedLayer
public ClippedLayer(float width, float height)
-
-
Method Details
-
width
public float width()Description copied from class:Layer
Returns the width of this layer. Note: not all layers know their size. Those that don't return 0. -
height
public float height()Description copied from class:Layer
Returns the height of this layer. Note: not all layers know their size. Those that don't return 0. -
setSize
Updates the size of this clipped layer, and hence its clipping rectangle. -
setSize
Updates the size of this clipped layer, and hence its clipping rectangle. -
setWidth
Updates the width of this group layer, and hence its clipping rectangle. -
setHeight
Updates the height of this group layer, and hence its clipping rectangle.
-