Package icyllis.modernui.graphics

# Class RenderNode

java.lang.Object
icyllis.modernui.graphics.RenderProperties
icyllis.modernui.graphics.RenderNode

public final class RenderNode extends RenderProperties

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `@SharedPtr Surface`
  `mLayerSurface`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `RenderNode()`
  Creates a new RenderNode that can be used to record batches of drawing operations, and store / apply render properties when drawn.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Canvas`
  `beginRecording(int width, int height)`
  Starts recording a display list for the render node.
  `void`
  `endRecording()`
  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`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### mLayerSurface

    @SharedPtr public @SharedPtr Surface 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

    @Nonnull public Canvas beginRecording(int width, int height)
    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 call `endRecording()` will result in an `IllegalStateException` 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 with `RenderProperties.setPosition(Rect)`.
      `height` - The height of the recording viewport. This will not alter the height of the RenderNode itself, that must be set with `RenderProperties.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 call `endRecording()` first.
    See Also:
      - `endRecording()`
      - invalid reference

            #hasDisplayList()

  - ### endRecording

    public void endRecording()
    Ends the recording for this display list. Calling this method marks the display list valid and
    invalid reference

        #hasDisplayList()

    will return true.
    See Also:
      - `beginRecording(int, int)`
      - invalid reference

            #hasDisplayList()