Package icyllis.arc3d.sketch
Class NWayCanvas
java.lang.Object
icyllis.arc3d.sketch.Canvas
icyllis.arc3d.sketch.NoDrawCanvas
icyllis.arc3d.sketch.NWayCanvas
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
PaintFilterCanvas
-
Nested Class Summary
Nested classes/interfaces inherited from class icyllis.arc3d.sketch.Canvas
Canvas.PointMode, Canvas.SaveLayerFlag, Canvas.SrcRectConstraint -
Field Summary
FieldsFields inherited from class icyllis.arc3d.sketch.Canvas
F16_COLOR_TYPE_SAVE_LAYER_FLAG, FULL_LAYER_SAVE_LAYER_STRATEGY, INIT_WITH_PREVIOUS_SAVE_LAYER_FLAG, NO_LAYER_SAVE_LAYER_STRATEGY, POINT_MODE_LINES, POINT_MODE_POINTS, POINT_MODE_POLYGON, QUAD_AA_FLAG_BOTTOM, QUAD_AA_FLAG_LEFT, QUAD_AA_FLAG_RIGHT, QUAD_AA_FLAG_TOP, QUAD_AA_FLAGS_ALL, QUAD_AA_FLAGS_NONE, SRC_RECT_CONSTRAINT_FAST, SRC_RECT_CONSTRAINT_STRICT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidclose()Draws saved layers, if any.protected voidprotected voiddidScale(float sx, float sy, float sz) protected voiddidSetMatrix(Matrix4c matrix) protected voiddidTranslate(float dx, float dy, float dz) protected voidonClipRect(Rect2fc rect, int clipOp, boolean doAA) protected voidonDrawArc(float cx, float cy, float radius, float startAngle, float sweepAngle, int cap, float width, Paint paint) protected voidonDrawBlurredRRect(RRect rr, Paint paint, float blurRadius, float noiseAlpha) protected voidonDrawChord(float cx, float cy, float radius, float startAngle, float sweepAngle, Paint paint) protected voidonDrawEdgeAAQuad(Rect2fc rect, float[] clip, int edgeFlags, Paint paint) protected voidonDrawEllipse(float cx, float cy, float rx, float ry, Paint paint) protected voidonDrawGlyphRunList(GlyphRunList glyphRunList, Paint paint) protected voidonDrawImageRect(@RawPtr Image image, Rect2fc src, Rect2fc dst, SamplingOptions sampling, Paint paint, int constraint) protected voidonDrawLine(float x0, float y0, float x1, float y1, int cap, float width, Paint paint) protected voidonDrawPaint(Paint paint) protected voidprotected voidonDrawPoints(int mode, float[] pts, int offset, int count, Paint paint) protected voidonDrawRect(Rect2fc r, Paint paint) protected voidonDrawRRect(RRect rr, Paint paint) protected voidonDrawTextBlob(TextBlob blob, float originX, float originY, Paint paint) protected voidonDrawVertices(Vertices vertices, Blender blender, Paint paint) voidvoidremoveCanvas(@RawPtr Canvas canvas) protected voidprotected voidwillSave()Methods inherited from class icyllis.arc3d.sketch.Canvas
clear, clear, clipRect, clipRect, clipRect, clipRect, clipRect, clipRect, clipRect, clipRect, clipRect, concat, concat, concat, didRestore, discard, drawArc, drawArc, drawBlurredRRect, drawChord, drawCircle, drawColor, drawColor, drawColor, drawColor, drawEdgeAAQuad, drawEllipse, drawGlyphs, drawImage, drawImageRect, drawImageRect, drawLine, drawLine, drawPaint, drawPie, drawPoint, drawPoint, drawPoints, drawRect, drawRect, drawRect, drawRRect, drawTextBlob, drawVertices, getBaseLayerHeight, getBaseLayerWidth, getCommandContext, getDeviceClipBounds, getImageInfo, getLocalClipBounds, getLocalToDevice, getLocalToDevice, getRootDevice, getSaveCount, getSaveLayerStrategy, getSurface, isClipEmpty, isClipRect, makeSurface, onDiscard, onGetImageInfo, onNewSurface, quickReject, quickReject, resetMatrix, restore, restoreToCount, rotate, rotate, save, saveLayer, saveLayer, saveLayer, saveLayer, saveLayerAlpha, saveLayerAlpha, scale, scale, scale, setMatrix, shear, shear, translate, translate
-
Field Details
-
mList
-
mSize
protected int mSize
-
-
Constructor Details
-
NWayCanvas
public NWayCanvas(int width, int height)
-
-
Method Details
-
close
public void close()Description copied from class:CanvasDraws saved layers, if any. Frees up resources used by Canvas.- Specified by:
closein interfaceAutoCloseable- Overrides:
closein classCanvas
-
addCanvas
-
removeCanvas
-
removeAll
public void removeAll() -
willSave
protected void willSave() -
willRestore
protected void willRestore()- Overrides:
willRestorein classCanvas
-
didTranslate
protected void didTranslate(float dx, float dy, float dz) - Overrides:
didTranslatein classCanvas
-
didScale
protected void didScale(float sx, float sy, float sz) -
didConcat
-
didSetMatrix
- Overrides:
didSetMatrixin classCanvas
-
onClipRect
- Overrides:
onClipRectin classCanvas
-
onDrawPaint
- Overrides:
onDrawPaintin classNoDrawCanvas
-
onDrawPoints
- Overrides:
onDrawPointsin classNoDrawCanvas
-
onDrawLine
protected void onDrawLine(float x0, float y0, float x1, float y1, int cap, float width, Paint paint) - Overrides:
onDrawLinein classNoDrawCanvas
-
onDrawRect
- Overrides:
onDrawRectin classNoDrawCanvas
-
onDrawRRect
- Overrides:
onDrawRRectin classNoDrawCanvas
-
onDrawEllipse
- Overrides:
onDrawEllipsein classNoDrawCanvas
-
onDrawArc
protected void onDrawArc(float cx, float cy, float radius, float startAngle, float sweepAngle, int cap, float width, Paint paint) - Overrides:
onDrawArcin classNoDrawCanvas
-
onDrawPie
protected void onDrawPie(float cx, float cy, float radius, float startAngle, float sweepAngle, Paint paint) - Overrides:
onDrawPiein classNoDrawCanvas
-
onDrawChord
protected void onDrawChord(float cx, float cy, float radius, float startAngle, float sweepAngle, Paint paint) - Overrides:
onDrawChordin classNoDrawCanvas
-
onDrawImageRect
protected void onDrawImageRect(@RawPtr @RawPtr Image image, Rect2fc src, Rect2fc dst, SamplingOptions sampling, Paint paint, int constraint) - Overrides:
onDrawImageRectin classNoDrawCanvas
-
onDrawTextBlob
- Overrides:
onDrawTextBlobin classNoDrawCanvas
-
onDrawGlyphRunList
- Overrides:
onDrawGlyphRunListin classNoDrawCanvas
-
onDrawVertices
- Overrides:
onDrawVerticesin classNoDrawCanvas
-
onDrawEdgeAAQuad
- Overrides:
onDrawEdgeAAQuadin classNoDrawCanvas
-
onDrawBlurredRRect
- Overrides:
onDrawBlurredRRectin classNoDrawCanvas
-