GLES20Canvaspublic class GLES20Canvas extends HardwareCanvas An implementation of Canvas on top of OpenGL ES 2.0. |
Fields Summary |
---|
private final boolean | mOpaque | protected long | mRenderer | private CanvasFinalizer | mFinalizer | private int | mWidth | private int | mHeight | private float[] | mPoint | private float[] | mLine | private android.graphics.Rect | mClipBounds | private android.graphics.RectF | mPathBounds | private android.graphics.DrawFilter | mFilter | private static boolean | sIsAvailable |
Constructors Summary |
---|
protected GLES20Canvas()
mOpaque = false;
mRenderer = nCreateDisplayListRenderer();
setupFinalizer();
|
Methods Summary |
---|
public int | callDrawGLFunction2(long drawGLFunction)
return nCallDrawGLFunction(mRenderer, drawGLFunction);
| public boolean | clipPath(android.graphics.Path path)
return nClipPath(mRenderer, path.mNativePath, Region.Op.INTERSECT.nativeInt);
| public boolean | clipPath(android.graphics.Path path, Region.Op op)
return nClipPath(mRenderer, path.mNativePath, op.nativeInt);
| public boolean | clipRect(float left, float top, float right, float bottom)
return nClipRect(mRenderer, left, top, right, bottom, Region.Op.INTERSECT.nativeInt);
| public boolean | clipRect(float left, float top, float right, float bottom, Region.Op op)
return nClipRect(mRenderer, left, top, right, bottom, op.nativeInt);
| public boolean | clipRect(int left, int top, int right, int bottom)
return nClipRect(mRenderer, left, top, right, bottom, Region.Op.INTERSECT.nativeInt);
| public boolean | clipRect(android.graphics.Rect rect)
return nClipRect(mRenderer, rect.left, rect.top, rect.right, rect.bottom,
Region.Op.INTERSECT.nativeInt);
| public boolean | clipRect(android.graphics.Rect rect, Region.Op op)
return nClipRect(mRenderer, rect.left, rect.top, rect.right, rect.bottom, op.nativeInt);
| public boolean | clipRect(android.graphics.RectF rect)
return nClipRect(mRenderer, rect.left, rect.top, rect.right, rect.bottom,
Region.Op.INTERSECT.nativeInt);
| public boolean | clipRect(android.graphics.RectF rect, Region.Op op)
return nClipRect(mRenderer, rect.left, rect.top, rect.right, rect.bottom, op.nativeInt);
| public boolean | clipRegion(android.graphics.Region region)
return nClipRegion(mRenderer, region.mNativeRegion, Region.Op.INTERSECT.nativeInt);
| public boolean | clipRegion(android.graphics.Region region, Region.Op op)
return nClipRegion(mRenderer, region.mNativeRegion, op.nativeInt);
| public void | concat(android.graphics.Matrix matrix)
if (matrix != null) nConcatMatrix(mRenderer, matrix.native_instance);
| public void | drawARGB(int a, int r, int g, int b)
drawColor((a & 0xFF) << 24 | (r & 0xFF) << 16 | (g & 0xFF) << 8 | (b & 0xFF));
| public void | drawArc(float left, float top, float right, float bottom, float startAngle, float sweepAngle, boolean useCenter, android.graphics.Paint paint)
nDrawArc(mRenderer, left, top, right, bottom,
startAngle, sweepAngle, useCenter, paint.mNativePaint);
| public void | drawBitmap(android.graphics.Bitmap bitmap, float left, float top, android.graphics.Paint paint)
throwIfCannotDraw(bitmap);
final long nativePaint = paint == null ? 0 : paint.mNativePaint;
nDrawBitmap(mRenderer, bitmap.mNativeBitmap, left, top, nativePaint);
| public void | drawBitmap(android.graphics.Bitmap bitmap, android.graphics.Matrix matrix, android.graphics.Paint paint)
throwIfCannotDraw(bitmap);
final long nativePaint = paint == null ? 0 : paint.mNativePaint;
nDrawBitmap(mRenderer, bitmap.mNativeBitmap, matrix.native_instance, nativePaint);
| public void | drawBitmap(android.graphics.Bitmap bitmap, android.graphics.Rect src, android.graphics.Rect dst, android.graphics.Paint paint)
throwIfCannotDraw(bitmap);
final long nativePaint = paint == null ? 0 : paint.mNativePaint;
int left, top, right, bottom;
if (src == null) {
left = top = 0;
right = bitmap.getWidth();
bottom = bitmap.getHeight();
} else {
left = src.left;
right = src.right;
top = src.top;
bottom = src.bottom;
}
nDrawBitmap(mRenderer, bitmap.mNativeBitmap, left, top, right, bottom,
dst.left, dst.top, dst.right, dst.bottom, nativePaint);
| public void | drawBitmap(android.graphics.Bitmap bitmap, android.graphics.Rect src, android.graphics.RectF dst, android.graphics.Paint paint)
throwIfCannotDraw(bitmap);
final long nativePaint = paint == null ? 0 : paint.mNativePaint;
float left, top, right, bottom;
if (src == null) {
left = top = 0;
right = bitmap.getWidth();
bottom = bitmap.getHeight();
} else {
left = src.left;
right = src.right;
top = src.top;
bottom = src.bottom;
}
nDrawBitmap(mRenderer, bitmap.mNativeBitmap, left, top, right, bottom,
dst.left, dst.top, dst.right, dst.bottom, nativePaint);
| public void | drawBitmap(int[] colors, int offset, int stride, float x, float y, int width, int height, boolean hasAlpha, android.graphics.Paint paint)
if (width < 0) {
throw new IllegalArgumentException("width must be >= 0");
}
if (height < 0) {
throw new IllegalArgumentException("height must be >= 0");
}
if (Math.abs(stride) < width) {
throw new IllegalArgumentException("abs(stride) must be >= width");
}
int lastScanline = offset + (height - 1) * stride;
int length = colors.length;
if (offset < 0 || (offset + width > length) || lastScanline < 0 ||
(lastScanline + width > length)) {
throw new ArrayIndexOutOfBoundsException();
}
final long nativePaint = paint == null ? 0 : paint.mNativePaint;
nDrawBitmap(mRenderer, colors, offset, stride, x, y,
width, height, hasAlpha, nativePaint);
| public void | drawBitmap(int[] colors, int offset, int stride, int x, int y, int width, int height, boolean hasAlpha, android.graphics.Paint paint)
drawBitmap(colors, offset, stride, (float) x, (float) y, width, height, hasAlpha, paint);
| public void | drawBitmapMesh(android.graphics.Bitmap bitmap, int meshWidth, int meshHeight, float[] verts, int vertOffset, int[] colors, int colorOffset, android.graphics.Paint paint)
throwIfCannotDraw(bitmap);
if (meshWidth < 0 || meshHeight < 0 || vertOffset < 0 || colorOffset < 0) {
throw new ArrayIndexOutOfBoundsException();
}
if (meshWidth == 0 || meshHeight == 0) {
return;
}
final int count = (meshWidth + 1) * (meshHeight + 1);
checkRange(verts.length, vertOffset, count * 2);
if (colors != null) {
checkRange(colors.length, colorOffset, count);
}
final long nativePaint = paint == null ? 0 : paint.mNativePaint;
nDrawBitmapMesh(mRenderer, bitmap.mNativeBitmap, meshWidth, meshHeight,
verts, vertOffset, colors, colorOffset, nativePaint);
| public void | drawCircle(float cx, float cy, float radius, android.graphics.Paint paint)
nDrawCircle(mRenderer, cx, cy, radius, paint.mNativePaint);
| public void | drawCircle(android.graphics.CanvasProperty cx, android.graphics.CanvasProperty cy, android.graphics.CanvasProperty radius, android.graphics.CanvasProperty paint)
nDrawCircle(mRenderer, cx.getNativeContainer(), cy.getNativeContainer(),
radius.getNativeContainer(), paint.getNativeContainer());
| public void | drawColor(int color)
drawColor(color, PorterDuff.Mode.SRC_OVER);
| public void | drawColor(int color, PorterDuff.Mode mode)
nDrawColor(mRenderer, color, mode.nativeInt);
| void | drawHardwareLayer(HardwareLayer layer, float x, float y, android.graphics.Paint paint)
layer.setLayerPaint(paint);
nDrawLayer(mRenderer, layer.getLayerHandle(), x, y);
| public void | drawLine(float startX, float startY, float stopX, float stopY, android.graphics.Paint paint)
float[] line = getLineStorage();
line[0] = startX;
line[1] = startY;
line[2] = stopX;
line[3] = stopY;
drawLines(line, 0, 4, paint);
| public void | drawLines(float[] pts, int offset, int count, android.graphics.Paint paint)
if (count < 4) return;
if ((offset | count) < 0 || offset + count > pts.length) {
throw new IllegalArgumentException("The lines array must contain 4 elements per line.");
}
nDrawLines(mRenderer, pts, offset, count, paint.mNativePaint);
| public void | drawLines(float[] pts, android.graphics.Paint paint)
drawLines(pts, 0, pts.length, paint);
| public void | drawOval(float left, float top, float right, float bottom, android.graphics.Paint paint)
nDrawOval(mRenderer, left, top, right, bottom, paint.mNativePaint);
| public void | drawPaint(android.graphics.Paint paint)
final Rect r = getInternalClipBounds();
nGetClipBounds(mRenderer, r);
drawRect(r.left, r.top, r.right, r.bottom, paint);
| public void | drawPatch(android.graphics.NinePatch patch, android.graphics.Rect dst, android.graphics.Paint paint)
Bitmap bitmap = patch.getBitmap();
throwIfCannotDraw(bitmap);
final long nativePaint = paint == null ? 0 : paint.mNativePaint;
nDrawPatch(mRenderer, bitmap.mNativeBitmap, patch.mNativeChunk,
dst.left, dst.top, dst.right, dst.bottom, nativePaint);
| public void | drawPatch(android.graphics.NinePatch patch, android.graphics.RectF dst, android.graphics.Paint paint)
Bitmap bitmap = patch.getBitmap();
throwIfCannotDraw(bitmap);
final long nativePaint = paint == null ? 0 : paint.mNativePaint;
nDrawPatch(mRenderer, bitmap.mNativeBitmap, patch.mNativeChunk,
dst.left, dst.top, dst.right, dst.bottom, nativePaint);
| public void | drawPath(android.graphics.Path path, android.graphics.Paint paint)
if (path.isSimplePath) {
if (path.rects != null) {
nDrawRects(mRenderer, path.rects.mNativeRegion, paint.mNativePaint);
}
} else {
nDrawPath(mRenderer, path.mNativePath, paint.mNativePaint);
}
| public void | drawPicture(android.graphics.Picture picture)
picture.endRecording();
// TODO: Implement rendering
| public void | drawPoint(float x, float y, android.graphics.Paint paint)
float[] point = getPointStorage();
point[0] = x;
point[1] = y;
drawPoints(point, 0, 2, paint);
| public void | drawPoints(float[] pts, android.graphics.Paint paint)
drawPoints(pts, 0, pts.length, paint);
| public void | drawPoints(float[] pts, int offset, int count, android.graphics.Paint paint)
if (count < 2) return;
nDrawPoints(mRenderer, pts, offset, count, paint.mNativePaint);
| public void | drawRGB(int r, int g, int b)
drawColor(0xFF000000 | (r & 0xFF) << 16 | (g & 0xFF) << 8 | (b & 0xFF));
| public void | drawRect(float left, float top, float right, float bottom, android.graphics.Paint paint)
if (left == right || top == bottom) return;
nDrawRect(mRenderer, left, top, right, bottom, paint.mNativePaint);
| public void | drawRect(android.graphics.Rect r, android.graphics.Paint paint)
drawRect(r.left, r.top, r.right, r.bottom, paint);
| public void | drawRect(android.graphics.RectF r, android.graphics.Paint paint)
drawRect(r.left, r.top, r.right, r.bottom, paint);
| public int | drawRenderNode(RenderNode renderNode, android.graphics.Rect dirty, int flags)
return nDrawRenderNode(mRenderer, renderNode.getNativeDisplayList(), dirty, flags);
| public void | drawRoundRect(android.graphics.CanvasProperty left, android.graphics.CanvasProperty top, android.graphics.CanvasProperty right, android.graphics.CanvasProperty bottom, android.graphics.CanvasProperty rx, android.graphics.CanvasProperty ry, android.graphics.CanvasProperty paint)
nDrawRoundRect(mRenderer, left.getNativeContainer(), top.getNativeContainer(),
right.getNativeContainer(), bottom.getNativeContainer(),
rx.getNativeContainer(), ry.getNativeContainer(),
paint.getNativeContainer());
| public void | drawRoundRect(float left, float top, float right, float bottom, float rx, float ry, android.graphics.Paint paint)
nDrawRoundRect(mRenderer, left, top, right, bottom, rx, ry, paint.mNativePaint);
| public void | drawText(char[] text, int index, int count, float x, float y, android.graphics.Paint paint)
if ((index | count | (index + count) | (text.length - index - count)) < 0) {
throw new IndexOutOfBoundsException();
}
nDrawText(mRenderer, text, index, count, x, y,
paint.mBidiFlags, paint.mNativePaint, paint.mNativeTypeface);
| public void | drawText(java.lang.CharSequence text, int start, int end, float x, float y, android.graphics.Paint paint)
if ((start | end | (end - start) | (text.length() - end)) < 0) {
throw new IndexOutOfBoundsException();
}
if (text instanceof String || text instanceof SpannedString ||
text instanceof SpannableString) {
nDrawText(mRenderer, text.toString(), start, end, x, y, paint.mBidiFlags,
paint.mNativePaint, paint.mNativeTypeface);
} else if (text instanceof GraphicsOperations) {
((GraphicsOperations) text).drawText(this, start, end, x, y, paint);
} else {
char[] buf = TemporaryBuffer.obtain(end - start);
TextUtils.getChars(text, start, end, buf, 0);
nDrawText(mRenderer, buf, 0, end - start, x, y,
paint.mBidiFlags, paint.mNativePaint, paint.mNativeTypeface);
TemporaryBuffer.recycle(buf);
}
| public void | drawText(java.lang.String text, int start, int end, float x, float y, android.graphics.Paint paint)
if ((start | end | (end - start) | (text.length() - end)) < 0) {
throw new IndexOutOfBoundsException();
}
nDrawText(mRenderer, text, start, end, x, y,
paint.mBidiFlags, paint.mNativePaint, paint.mNativeTypeface);
| public void | drawText(java.lang.String text, float x, float y, android.graphics.Paint paint)
nDrawText(mRenderer, text, 0, text.length(), x, y,
paint.mBidiFlags, paint.mNativePaint, paint.mNativeTypeface);
| public void | drawTextOnPath(char[] text, int index, int count, android.graphics.Path path, float hOffset, float vOffset, android.graphics.Paint paint)
if (index < 0 || index + count > text.length) {
throw new ArrayIndexOutOfBoundsException();
}
nDrawTextOnPath(mRenderer, text, index, count, path.mNativePath, hOffset, vOffset,
paint.mBidiFlags, paint.mNativePaint, paint.mNativeTypeface);
| public void | drawTextOnPath(java.lang.String text, android.graphics.Path path, float hOffset, float vOffset, android.graphics.Paint paint)
if (text.length() == 0) return;
nDrawTextOnPath(mRenderer, text, 0, text.length(), path.mNativePath, hOffset, vOffset,
paint.mBidiFlags, paint.mNativePaint, paint.mNativeTypeface);
| public void | drawTextRun(char[] text, int index, int count, int contextIndex, int contextCount, float x, float y, boolean isRtl, android.graphics.Paint paint)
if ((index | count | text.length - index - count) < 0) {
throw new IndexOutOfBoundsException();
}
nDrawTextRun(mRenderer, text, index, count, contextIndex, contextCount, x, y, isRtl,
paint.mNativePaint, paint.mNativeTypeface);
| public void | drawTextRun(java.lang.CharSequence text, int start, int end, int contextStart, int contextEnd, float x, float y, boolean isRtl, android.graphics.Paint paint)
if ((start | end | end - start | text.length() - end) < 0) {
throw new IndexOutOfBoundsException();
}
if (text instanceof String || text instanceof SpannedString ||
text instanceof SpannableString) {
nDrawTextRun(mRenderer, text.toString(), start, end, contextStart,
contextEnd, x, y, isRtl, paint.mNativePaint, paint.mNativeTypeface);
} else if (text instanceof GraphicsOperations) {
((GraphicsOperations) text).drawTextRun(this, start, end,
contextStart, contextEnd, x, y, isRtl, paint);
} else {
int contextLen = contextEnd - contextStart;
int len = end - start;
char[] buf = TemporaryBuffer.obtain(contextLen);
TextUtils.getChars(text, contextStart, contextEnd, buf, 0);
nDrawTextRun(mRenderer, buf, start - contextStart, len, 0, contextLen,
x, y, isRtl, paint.mNativePaint, paint.mNativeTypeface);
TemporaryBuffer.recycle(buf);
}
| public void | drawVertices(VertexMode mode, int vertexCount, float[] verts, int vertOffset, float[] texs, int texOffset, int[] colors, int colorOffset, short[] indices, int indexOffset, int indexCount, android.graphics.Paint paint)
// TODO: Implement
| public boolean | getClipBounds(android.graphics.Rect bounds)
return nGetClipBounds(mRenderer, bounds);
| public android.graphics.DrawFilter | getDrawFilter()
return mFilter;
| public int | getHeight()
return mHeight;
| private android.graphics.Rect | getInternalClipBounds()
if (mClipBounds == null) mClipBounds = new Rect();
return mClipBounds;
| private float[] | getLineStorage()
if (mLine == null) mLine = new float[4];
return mLine;
| public void | getMatrix(android.graphics.Matrix matrix)
nGetMatrix(mRenderer, matrix.native_instance);
| public int | getMaximumBitmapHeight()
return nGetMaximumTextureHeight();
| public int | getMaximumBitmapWidth()
return nGetMaximumTextureWidth();
| private android.graphics.RectF | getPathBounds()
if (mPathBounds == null) mPathBounds = new RectF();
return mPathBounds;
| private float[] | getPointStorage()
if (mPoint == null) mPoint = new float[2];
return mPoint;
| long | getRenderer()Returns the native OpenGLRenderer object.
return mRenderer;
| public int | getSaveCount()
return nGetSaveCount(mRenderer);
| public int | getWidth()
return mWidth;
| public void | insertInorderBarrier()
nInsertReorderBarrier(mRenderer, false);
| public void | insertReorderBarrier()
nInsertReorderBarrier(mRenderer, true);
| static boolean | isAvailable()
return sIsAvailable;
| public boolean | isOpaque()
return mOpaque;
| private static native int | nCallDrawGLFunction(long renderer, long drawGLFunction)
| private static native boolean | nClipPath(long renderer, long path, int op)
| private static native boolean | nClipRect(long renderer, float left, float top, float right, float bottom, int op)
| private static native boolean | nClipRect(long renderer, int left, int top, int right, int bottom, int op)
| private static native boolean | nClipRegion(long renderer, long region, int op)
| private static native void | nConcatMatrix(long renderer, long matrix)
| private static native long | nCreateDisplayListRenderer()
| private static native void | nDestroyRenderer(long renderer)
| private static native void | nDrawArc(long renderer, float left, float top, float right, float bottom, float startAngle, float sweepAngle, boolean useCenter, long paint)
| private static native void | nDrawBitmap(long renderer, long bitmap, float left, float top, long paint)
| private static native void | nDrawBitmap(long renderer, long bitmap, long matrix, long paint)
| private static native void | nDrawBitmap(long renderer, long bitmap, float srcLeft, float srcTop, float srcRight, float srcBottom, float left, float top, float right, float bottom, long paint)
| private static native void | nDrawBitmap(long renderer, int[] colors, int offset, int stride, float x, float y, int width, int height, boolean hasAlpha, long nativePaint)
| private static native void | nDrawBitmapMesh(long renderer, long bitmap, int meshWidth, int meshHeight, float[] verts, int vertOffset, int[] colors, int colorOffset, long paint)
| private static native void | nDrawCircle(long renderer, float cx, float cy, float radius, long paint)
| private static native void | nDrawCircle(long renderer, long propCx, long propCy, long propRadius, long propPaint)
| private static native void | nDrawColor(long renderer, int color, int mode)
| private static native void | nDrawLayer(long renderer, long layer, float x, float y)
| private static native void | nDrawLines(long renderer, float[] points, int offset, int count, long paint)
| private static native void | nDrawOval(long renderer, float left, float top, float right, float bottom, long paint)
| private static native void | nDrawPatch(long renderer, long bitmap, long chunk, float left, float top, float right, float bottom, long paint)
| private static native void | nDrawPath(long renderer, long path, long paint)
| private static native void | nDrawPoints(long renderer, float[] points, int offset, int count, long paint)
| private static native void | nDrawRect(long renderer, float left, float top, float right, float bottom, long paint)
| private static native void | nDrawRects(long renderer, long region, long paint)
| private static native int | nDrawRenderNode(long renderer, long renderNode, android.graphics.Rect dirty, int flags)
| private static native void | nDrawRoundRect(long renderer, long propLeft, long propTop, long propRight, long propBottom, long propRx, long propRy, long propPaint)
| private static native void | nDrawRoundRect(long renderer, float left, float top, float right, float bottom, float rx, float y, long paint)
| private static native void | nDrawText(long renderer, char[] text, int index, int count, float x, float y, int bidiFlags, long paint, long typeface)
| private static native void | nDrawText(long renderer, java.lang.String text, int start, int end, float x, float y, int bidiFlags, long paint, long typeface)
| private static native void | nDrawTextOnPath(long renderer, char[] text, int index, int count, long path, float hOffset, float vOffset, int bidiFlags, long nativePaint, long typeface)
| private static native void | nDrawTextOnPath(long renderer, java.lang.String text, int start, int end, long path, float hOffset, float vOffset, int bidiFlags, long nativePaint, long typeface)
| private static native void | nDrawTextRun(long renderer, char[] text, int index, int count, int contextIndex, int contextCount, float x, float y, boolean isRtl, long nativePaint, long nativeTypeface)
| private static native void | nDrawTextRun(long renderer, java.lang.String text, int start, int end, int contextStart, int contextEnd, float x, float y, boolean isRtl, long nativePaint, long nativeTypeface)
| private static native void | nFinish(long renderer)
| protected static native long | nFinishRecording(long renderer)
| private static native boolean | nGetClipBounds(long renderer, android.graphics.Rect bounds)
| private static native void | nGetMatrix(long renderer, long matrix)
| private static native int | nGetMaximumTextureHeight()
| private static native int | nGetMaximumTextureWidth()
| private static native int | nGetSaveCount(long renderer)
| private static native void | nInsertReorderBarrier(long renderer, boolean enableReorder)
| private static native boolean | nIsAvailable()
| private static native int | nPrepare(long renderer, boolean opaque)
| private static native int | nPrepareDirty(long renderer, int left, int top, int right, int bottom, boolean opaque)
| private static native boolean | nQuickReject(long renderer, float left, float top, float right, float bottom)
| private static native void | nResetDisplayListRenderer(long renderer)
| private static native void | nResetPaintFilter(long renderer)
| private static native void | nRestore(long renderer)
| private static native void | nRestoreToCount(long renderer, int saveCount)
| private static native void | nRotate(long renderer, float degrees)
| private static native int | nSave(long renderer, int flags)
| private static native int | nSaveLayer(long renderer, long paint, int saveFlags)
| private static native int | nSaveLayer(long renderer, float left, float top, float right, float bottom, long paint, int saveFlags)
| private static native int | nSaveLayerAlpha(long renderer, int alpha, int saveFlags)
| private static native int | nSaveLayerAlpha(long renderer, float left, float top, float right, float bottom, int alpha, int saveFlags)
| private static native void | nScale(long renderer, float sx, float sy)
| private static native void | nSetHighContrastText(long renderer, boolean highContrastText)
| private static native void | nSetMatrix(long renderer, long matrix)
| private static native void | nSetProperty(java.lang.String name, java.lang.String value)
| private static native void | nSetViewport(long renderer, int width, int height)
| private static native void | nSetupPaintFilter(long renderer, int clearBits, int setBits)
| private static native void | nSkew(long renderer, float sx, float sy)
| private static native void | nTranslate(long renderer, float dx, float dy)
| public void | onPostDraw()
nFinish(mRenderer);
| public int | onPreDraw(android.graphics.Rect dirty)
if (dirty != null) {
return nPrepareDirty(mRenderer, dirty.left, dirty.top, dirty.right, dirty.bottom,
mOpaque);
} else {
return nPrepare(mRenderer, mOpaque);
}
| public boolean | quickReject(float left, float top, float right, float bottom, EdgeType type)
return nQuickReject(mRenderer, left, top, right, bottom);
| public boolean | quickReject(android.graphics.Path path, EdgeType type)
RectF pathBounds = getPathBounds();
path.computeBounds(pathBounds, true);
return nQuickReject(mRenderer, pathBounds.left, pathBounds.top,
pathBounds.right, pathBounds.bottom);
| public boolean | quickReject(android.graphics.RectF rect, EdgeType type)
return nQuickReject(mRenderer, rect.left, rect.top, rect.right, rect.bottom);
| public void | restore()
nRestore(mRenderer);
| public void | restoreToCount(int saveCount)
nRestoreToCount(mRenderer, saveCount);
| public void | rotate(float degrees)
nRotate(mRenderer, degrees);
| public int | save()
return nSave(mRenderer, Canvas.CLIP_SAVE_FLAG | Canvas.MATRIX_SAVE_FLAG);
| public int | save(int saveFlags)
return nSave(mRenderer, saveFlags);
| public int | saveLayer(android.graphics.RectF bounds, android.graphics.Paint paint, int saveFlags)
if (bounds != null) {
return saveLayer(bounds.left, bounds.top, bounds.right, bounds.bottom, paint, saveFlags);
}
final long nativePaint = paint == null ? 0 : paint.mNativePaint;
return nSaveLayer(mRenderer, nativePaint, saveFlags);
| public int | saveLayer(float left, float top, float right, float bottom, android.graphics.Paint paint, int saveFlags)
if (left < right && top < bottom) {
final long nativePaint = paint == null ? 0 : paint.mNativePaint;
return nSaveLayer(mRenderer, left, top, right, bottom, nativePaint, saveFlags);
}
return save(saveFlags);
| public int | saveLayerAlpha(android.graphics.RectF bounds, int alpha, int saveFlags)
if (bounds != null) {
return saveLayerAlpha(bounds.left, bounds.top, bounds.right, bounds.bottom,
alpha, saveFlags);
}
return nSaveLayerAlpha(mRenderer, alpha, saveFlags);
| public int | saveLayerAlpha(float left, float top, float right, float bottom, int alpha, int saveFlags)
if (left < right && top < bottom) {
return nSaveLayerAlpha(mRenderer, left, top, right, bottom, alpha, saveFlags);
}
return save(saveFlags);
| public void | scale(float sx, float sy)
nScale(mRenderer, sx, sy);
| public void | setDrawFilter(android.graphics.DrawFilter filter)
mFilter = filter;
if (filter == null) {
nResetPaintFilter(mRenderer);
} else if (filter instanceof PaintFlagsDrawFilter) {
PaintFlagsDrawFilter flagsFilter = (PaintFlagsDrawFilter) filter;
nSetupPaintFilter(mRenderer, flagsFilter.clearBits, flagsFilter.setBits);
}
| public void | setHighContrastText(boolean highContrastText)
nSetHighContrastText(mRenderer, highContrastText);
| public void | setMatrix(android.graphics.Matrix matrix)
nSetMatrix(mRenderer, matrix == null ? 0 : matrix.native_instance);
| public static void | setProperty(java.lang.String name, java.lang.String value)
nSetProperty(name, value);
| public void | setViewport(int width, int height)
mWidth = width;
mHeight = height;
nSetViewport(mRenderer, width, height);
| private void | setupFinalizer()
if (mRenderer == 0) {
throw new IllegalStateException("Could not create GLES20Canvas renderer");
} else {
mFinalizer = new CanvasFinalizer(mRenderer);
}
| public void | skew(float sx, float sy)
nSkew(mRenderer, sx, sy);
| public void | translate(float dx, float dy)
if (dx != 0.0f || dy != 0.0f) nTranslate(mRenderer, dx, dy);
|
|