Package icyllis.modernui.graphics
Class RenderNode
java.lang.Object
icyllis.modernui.graphics.RenderProperties
icyllis.modernui.graphics.RenderNode
-
Field Summary
-
Constructor Summary
ConstructorDescriptionCreates a new RenderNode that can be used to record batches of drawing operations, and store / apply render properties when drawn. -
Method Summary
Modifier and TypeMethodDescriptionbeginRecording
(int width, int height) Starts recording a display list for the render node.void
Ends the recording for this display list.Methods inherited from class icyllis.modernui.graphics.RenderProperties
getAlpha, getAnimationMatrix, getBottom, getCameraDistance, getClipToBounds, getElevation, getHasOverlappingRendering, getHeight, getInverseMatrix, getLayerAlpha, getLayerBlendMode, getLeft, getMatrix, getPivotX, getPivotY, getRight, getRotationX, getRotationY, getRotationZ, getScaleX, getScaleY, getTop, getTranslationX, getTranslationY, getTranslationZ, getUseCompositingLayer, getUseTransientLayer, getWidth, getX, getY, getZ, isCameraDistanceExplicitlySet, isPivotExplicitlySet, offsetLeftAndRight, offsetTopAndBottom, resetCameraDistance, resetPivot, setAlpha, setAnimationMatrix, setBottom, setCameraDistance, setClipBounds, setClipToBounds, setElevation, setHasOverlappingRendering, setLeft, setPivotX, setPivotY, setPosition, setPosition, setRight, setRotationX, setRotationY, setRotationZ, setScaleX, setScaleY, setTop, setTranslationX, setTranslationY, setTranslationZ, setUseCompositingLayer, setX, setY, setZ
-
Field Details
-
mLayerSurface
-
-
Constructor Details
-
RenderNode
public RenderNode()Creates a new RenderNode that can be used to record batches of drawing operations, and store / apply render properties when drawn.
-
-
Method Details
-
beginRecording
Starts recording a display list for the render node. All operations performed on the returned canvas are recorded and stored in this display list.endRecording()
must be called when the recording is finished in order to apply the updated display list. Failing to callendRecording()
will result in anIllegalStateException
if this method is called again.- Parameters:
width
- The width of the recording viewport. This will not alter the width of the RenderNode itself, that must be set withRenderProperties.setPosition(Rect)
.height
- The height of the recording viewport. This will not alter the height of the RenderNode itself, that must be set withRenderProperties.setPosition(Rect)
.- Returns:
- A canvas to record drawing operations.
- Throws:
IllegalStateException
- If a recording is already in progress. That is, the previous call to this method did not callendRecording()
first.- See Also:
-
endRecording
public void endRecording()Ends the recording for this display list. Calling this method marks the display list valid andinvalid reference
#hasDisplayList()
- See Also:
-