Package icyllis.arc3d.core
Class NWayCanvas
java.lang.Object
icyllis.arc3d.core.Canvas
icyllis.arc3d.core.NoDrawCanvas
icyllis.arc3d.core.NWayCanvas
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
PaintFilterCanvas
-
Nested Class Summary
Nested classes/interfaces inherited from class icyllis.arc3d.core.Canvas
Canvas.PointMode, Canvas.SaveLayerFlag, Canvas.SrcRectConstraint
-
Field Summary
Fields inherited from class icyllis.arc3d.core.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, SRC_RECT_CONSTRAINT_FAST, SRC_RECT_CONSTRAINT_STRICT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
close()
Draws saved layers, if any.protected void
protected void
didScale
(float sx, float sy, float sz) protected void
didSetMatrix
(Matrix4c matrix) protected void
didTranslate
(float dx, float dy, float dz) protected void
onClipRect
(Rect2fc rect, int clipOp, boolean doAA) protected void
onDrawArc
(float cx, float cy, float radius, float startAngle, float sweepAngle, int cap, float width, Paint paint) protected void
onDrawChord
(float cx, float cy, float radius, float startAngle, float sweepAngle, Paint paint) protected void
onDrawCircle
(float cx, float cy, float radius, Paint paint) protected void
onDrawGlyphRunList
(GlyphRunList glyphRunList, Paint paint) protected void
onDrawImageRect
(@RawPtr Image image, Rect2fc src, Rect2fc dst, SamplingOptions sampling, Paint paint, int constraint) protected void
onDrawLine
(float x0, float y0, float x1, float y1, int cap, float width, Paint paint) protected void
onDrawPaint
(Paint paint) protected void
protected void
onDrawPoints
(int mode, float[] pts, int offset, int count, Paint paint) protected void
onDrawRect
(Rect2fc r, Paint paint) protected void
onDrawRoundRect
(RoundRect rr, Paint paint) protected void
onDrawTextBlob
(TextBlob blob, float originX, float originY, Paint paint) protected void
onDrawVertices
(Vertices vertices, @SharedPtr Blender blender, Paint paint) void
void
removeCanvas
(@RawPtr Canvas canvas) protected void
protected void
willSave()
Methods inherited from class icyllis.arc3d.core.Canvas
clear, clear, clipRect, clipRect, clipRect, clipRect, clipRect, clipRect, clipRect, clipRect, clipRect, concat, concat, didRestore, discard, drawArc, drawArc, drawChord, drawCircle, drawColor, drawColor, drawColor, drawColor, drawGlyphs, drawImage, drawImageRect, drawImageRect, drawLine, drawLine, drawPaint, drawPie, drawPoint, drawPoint, drawPoints, drawRect, drawRect, drawRect, drawRoundRect, drawRoundRect, drawRoundRect, drawRoundRect, drawRoundRect, drawTextBlob, drawTriangle, drawVertices, getBaseLayerHeight, getBaseLayerWidth, getDeviceClipBounds, getImageInfo, getLocalClipBounds, getLocalToDevice, getLocalToDevice, getRecordingContext, 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:Canvas
Draws saved layers, if any. Frees up resources used by Canvas.- Specified by:
close
in interfaceAutoCloseable
- Overrides:
close
in classCanvas
-
addCanvas
-
removeCanvas
-
removeAll
public void removeAll() -
willSave
protected void willSave() -
willRestore
protected void willRestore()- Overrides:
willRestore
in classCanvas
-
didTranslate
protected void didTranslate(float dx, float dy, float dz) - Overrides:
didTranslate
in classCanvas
-
didScale
protected void didScale(float sx, float sy, float sz) -
didConcat
-
didSetMatrix
- Overrides:
didSetMatrix
in classCanvas
-
onClipRect
- Overrides:
onClipRect
in classCanvas
-
onDrawPaint
- Overrides:
onDrawPaint
in classNoDrawCanvas
-
onDrawPoints
- Overrides:
onDrawPoints
in classNoDrawCanvas
-
onDrawLine
protected void onDrawLine(float x0, float y0, float x1, float y1, int cap, float width, Paint paint) - Overrides:
onDrawLine
in classNoDrawCanvas
-
onDrawRect
- Overrides:
onDrawRect
in classNoDrawCanvas
-
onDrawRoundRect
- Overrides:
onDrawRoundRect
in classNoDrawCanvas
-
onDrawCircle
- Overrides:
onDrawCircle
in classNoDrawCanvas
-
onDrawArc
protected void onDrawArc(float cx, float cy, float radius, float startAngle, float sweepAngle, int cap, float width, Paint paint) - Overrides:
onDrawArc
in classNoDrawCanvas
-
onDrawPie
protected void onDrawPie(float cx, float cy, float radius, float startAngle, float sweepAngle, Paint paint) - Overrides:
onDrawPie
in classNoDrawCanvas
-
onDrawChord
protected void onDrawChord(float cx, float cy, float radius, float startAngle, float sweepAngle, Paint paint) - Overrides:
onDrawChord
in classNoDrawCanvas
-
onDrawImageRect
protected void onDrawImageRect(@RawPtr @RawPtr Image image, Rect2fc src, Rect2fc dst, SamplingOptions sampling, Paint paint, int constraint) - Overrides:
onDrawImageRect
in classNoDrawCanvas
-
onDrawTextBlob
- Overrides:
onDrawTextBlob
in classNoDrawCanvas
-
onDrawGlyphRunList
- Overrides:
onDrawGlyphRunList
in classNoDrawCanvas
-
onDrawVertices
protected void onDrawVertices(Vertices vertices, @SharedPtr @SharedPtr Blender blender, Paint paint) - Overrides:
onDrawVertices
in classNoDrawCanvas
-