Package icyllis.arc3d.granite

# Class Draw

java.lang.Object
icyllis.arc3d.granite.Draw

All Implemented Interfaces:
  `AutoCloseable`

public final class Draw extends Object implements AutoCloseable
Represents a recorded draw operation.

Draw contains multiple groups of data, each of which will be initialized step by step.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `float`
  `mAARadius`
  Precomputed local AA radius if `GeometryRenderer.outsetBoundsForAA()` is true, set by `ClipStack`.
  `Rect2fc`
  `mDrawBounds`
  Clip params (immutable), set by `ClipStack`.
  `long`
  `mDrawOrder`
  Packed draw order, see `DrawOrder`.
  `Object`
  `mGeometry`
  `float`
  `mHalfWidth`
  Stroke params.
  `float`
  `mJoinLimit`
  `PaintParams`
  `mPaintParams`
  Paint params, null implies depth-only draw (i.e.
  `GeometryRenderer`
  `mRenderer`
  Pointer to the renderer instance, managed by `RendererProvider`.
  `Rect2ic`
  `mScissorRect`
  `byte`
  `mStrokeAlign`
  `byte`
  `mStrokeCap`
  `Matrixc`
  `mTransform`
  This matrix transforms geometry's local space to device space.
  `Rect2fc`
  `mTransformedShapeBounds`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Draw()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  `int`
  `getDepth()`
  Returns the painter's depth as unsigned integer.
  `float`
  `getDepthAsFloat()`
  `float`
  `getInflationRadius()`
  `float`
  `getMiterLimit()`
  `boolean`
  `isBevelJoin()`
  `boolean`
  `isClippedOut()`
  `boolean`
  `isMiterJoin()`
  `boolean`
  `isRoundJoin()`
  `boolean`
  `isStroke()`
  Returns true if the geometry is stroked instead of filled.

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

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

- ## Field Details

  - ### mRenderer

    public GeometryRenderer mRenderer
    Pointer to the renderer instance, managed by `RendererProvider`.

  - ### mTransform

    public Matrixc mTransform
    This matrix transforms geometry's local space to device space.

  - ### mGeometry

    public Object mGeometry

  - ### mDrawBounds

    public Rect2fc mDrawBounds
    Clip params (immutable), set by `ClipStack`.

    DrawBounds: Tight bounds of the draw in device space, including any padding/outset for stroking and expansion due to inverse fill and intersected with the scissor.

    TransformedShapeBounds: Clipped bounds of the shape in device space, including any padding/outset for stroking, intersected with the scissor and ignoring the fill rule. For a regular fill this is identical to DrawBounds. For an inverse fill, this is a subset of DrawBounds.

    ScissorRect: The scissor rectangle obtained by restricting the bounds of the clip stack that affects the draw to the device bounds. The scissor must contain DrawBounds and must already be intersected with the device bounds.

  - ### mTransformedShapeBounds

    public Rect2fc mTransformedShapeBounds

  - ### mScissorRect

    public Rect2ic mScissorRect

  - ### mAARadius

    public float mAARadius
    Precomputed local AA radius if `GeometryRenderer.outsetBoundsForAA()` is true, set by `ClipStack`.

  - ### mDrawOrder

    public long mDrawOrder
    Packed draw order, see `DrawOrder`.

  - ### mHalfWidth

    public float mHalfWidth
    Stroke params.

  - ### mJoinLimit

    public float mJoinLimit

  - ### mStrokeCap

    public byte mStrokeCap

  - ### mStrokeAlign

    public byte mStrokeAlign

  - ### mPaintParams

    @Nullable public PaintParams mPaintParams
    Paint params, null implies depth-only draw (i.e. clipping mask).

- ## Constructor Details

  - ### Draw

    public Draw()

- ## Method Details

  - ### close

    public void close()
    Specified by:
      `close` in interface `AutoCloseable`

  - ### isClippedOut

    public boolean isClippedOut()

  - ### isStroke

    public boolean isStroke()
    Returns true if the geometry is stroked instead of filled.

  - ### isMiterJoin

    public boolean isMiterJoin()

  - ### isBevelJoin

    public boolean isBevelJoin()

  - ### isRoundJoin

    public boolean isRoundJoin()

  - ### getMiterLimit

    public float getMiterLimit()

  - ### getInflationRadius

    public float getInflationRadius()
    See Also:
      - `StrokeRec.getInflationRadius()`

  - ### getDepth

    public int getDepth()
    Returns the painter's depth as unsigned integer.

  - ### getDepthAsFloat

    public float getDepthAsFloat()