Lines Matching refs:paint

36  * Path, text, Bitmap), and a paint (to describe the colors and styles for the
452 * @param paint This is copied, and is applied to the offscreen when
458 public int saveLayer(@Nullable RectF bounds, @Nullable Paint paint, @Saveflags int saveFlags) {
462 return saveLayer(bounds.left, bounds.top, bounds.right, bounds.bottom, paint, saveFlags);
466 * Convenience for saveLayer(bounds, paint, {@link #ALL_SAVE_FLAG})
468 public int saveLayer(@Nullable RectF bounds, @Nullable Paint paint) {
469 return saveLayer(bounds, paint, ALL_SAVE_FLAG);
475 public int saveLayer(float left, float top, float right, float bottom, @Nullable Paint paint,
478 paint != null ? paint.mNativePaint : 0,
483 * Convenience for saveLayer(left, top, right, bottom, paint, {@link #ALL_SAVE_FLAG})
485 public int saveLayer(float left, float top, float right, float bottom, @Nullable Paint paint) {
486 return saveLayer(left, top, right, bottom, paint, ALL_SAVE_FLAG);
1028 * the specified paint. This is equivalent (but faster) to drawing an
1029 * infinitely large rectangle with the specified paint.
1031 * @param paint The paint used to draw onto the canvas
1033 public void drawPaint(@NonNull Paint paint) {
1034 native_drawPaint(mNativeCanvasWrapper, paint.mNativePaint);
1039 * specified by pts[], and its diameter is specified by the paint's stroke
1043 * the paint's Cap type. The shape is a square, unless the cap type is
1051 * @param paint The paint used to draw the points
1053 public void drawPoints(float[] pts, int offset, int count, @NonNull Paint paint) {
1054 native_drawPoints(mNativeCanvasWrapper, pts, offset, count, paint.mNativePaint);
1060 public void drawPoints(@NonNull float[] pts, @NonNull Paint paint) {
1061 drawPoints(pts, 0, pts.length, paint);
1067 public void drawPoint(float x, float y, @NonNull Paint paint) {
1068 native_drawPoint(mNativeCanvasWrapper, x, y, paint.mNativePaint);
1073 * using the specified paint.
1075 * <p>Note that since a line is always "framed", the Style is ignored in the paint.</p>
1081 * @param paint The paint used to draw the line
1084 @NonNull Paint paint) {
1085 native_drawLine(mNativeCanvasWrapper, startX, startY, stopX, stopY, paint.mNativePaint);
1101 * @param paint The paint used to draw the points
1103 public void drawLines(float[] pts, int offset, int count, Paint paint) {
1104 native_drawLines(mNativeCanvasWrapper, pts, offset, count, paint.mNativePaint);
1107 public void drawLines(@NonNull float[] pts, @NonNull Paint paint) {
1108 drawLines(pts, 0, pts.length, paint);
1112 * Draw the specified Rect using the specified paint. The rectangle will
1113 * be filled or framed based on the Style in the paint.
1116 * @param paint The paint used to draw the rect
1118 public void drawRect(@NonNull RectF rect, @NonNull Paint paint) {
1120 rect.left, rect.top, rect.right, rect.bottom, paint.mNativePaint);
1125 * will be filled or framed based on the Style in the paint.
1128 * @param paint The paint used to draw the rectangle
1130 public void drawRect(@NonNull Rect r, @NonNull Paint paint) {
1131 drawRect(r.left, r.top, r.right, r.bottom, paint);
1136 * Draw the specified Rect using the specified paint. The rectangle will
1137 * be filled or framed based on the Style in the paint.
1143 * @param paint The paint used to draw the rect
1145 public void drawRect(float left, float top, float right, float bottom, @NonNull Paint paint) {
1146 native_drawRect(mNativeCanvasWrapper, left, top, right, bottom, paint.mNativePaint);
1150 * Draw the specified oval using the specified paint. The oval will be
1151 * filled or framed based on the Style in the paint.
1155 public void drawOval(@NonNull RectF oval, @NonNull Paint paint) {
1159 drawOval(oval.left, oval.top, oval.right, oval.bottom, paint);
1163 * Draw the specified oval using the specified paint. The oval will be
1164 * filled or framed based on the Style in the paint.
1166 public void drawOval(float left, float top, float right, float bottom, @NonNull Paint paint) {
1167 native_drawOval(mNativeCanvasWrapper, left, top, right, bottom, paint.mNativePaint);
1171 * Draw the specified circle using the specified paint. If radius is <= 0,
1173 * on the Style in the paint.
1178 * @param paint The paint used to draw the circle
1180 public void drawCircle(float cx, float cy, float radius, @NonNull Paint paint) {
1181 native_drawCircle(mNativeCanvasWrapper, cx, cy, radius, paint.mNativePaint);
1205 * @param paint The paint used to draw the arc
1208 @NonNull Paint paint) {
1210 paint);
1232 * @param paint The paint used to draw the arc
1235 float sweepAngle, boolean useCenter, @NonNull Paint paint) {
1237 useCenter, paint.mNativePaint);
1241 * Draw the specified round-rect using the specified paint. The roundrect
1242 * will be filled or framed based on the Style in the paint.
1247 * @param paint The paint used to draw the roundRect
1249 public void drawRoundRect(@NonNull RectF rect, float rx, float ry, @NonNull Paint paint) {
1250 drawRoundRect(rect.left, rect.top, rect.right, rect.bottom, rx, ry, paint);
1254 * Draw the specified round-rect using the specified paint. The roundrect
1255 * will be filled or framed based on the Style in the paint.
1259 * @param paint The paint used to draw the roundRect
1262 @NonNull Paint paint) {
1263 native_drawRoundRect(mNativeCanvasWrapper, left, top, right, bottom, rx, ry, paint.mNativePaint);
1267 * Draw the specified path using the specified paint. The path will be
1268 * filled or framed based on the Style in the paint.
1271 * @param paint The paint used to draw the path
1273 public void drawPath(@NonNull Path path, @NonNull Paint paint) {
1274 native_drawPath(mNativeCanvasWrapper, path.ni(), paint.mNativePaint);
1296 * @param paint The paint to draw the bitmap with. may be null
1300 public void drawPatch(@NonNull NinePatch patch, @NonNull Rect dst, @Nullable Paint paint) {
1301 patch.drawSoftware(this, dst, paint);
1309 * @param paint The paint to draw the bitmap with. may be null
1313 public void drawPatch(@NonNull NinePatch patch, @NonNull RectF dst, @Nullable Paint paint) {
1314 patch.drawSoftware(this, dst, paint);
1319 * the specified paint, transformed by the current matrix.
1321 * <p>Note: if the paint contains a maskfilter that generates a mask which
1334 * @param paint The paint used to draw the bitmap (may be null)
1336 public void drawBitmap(@NonNull Bitmap bitmap, float left, float top, @Nullable Paint paint) {
1339 paint != null ? paint.mNativePaint : 0, mDensity, mScreenDensity, bitmap.mDensity);
1347 * <p>Note: if the paint contains a maskfilter that generates a mask which
1362 * @param paint May be null. The paint used to draw the bitmap
1365 @Nullable Paint paint) {
1370 final long nativePaint = paint == null ? 0 : paint.mNativePaint;
1394 * <p>Note: if the paint contains a maskfilter that generates a mask which
1409 * @param paint May be null. The paint used to draw the bitmap
1412 @Nullable Paint paint) {
1417 final long nativePaint = paint == null ? 0 : paint.mNativePaint;
1453 * @param paint May be null. The paint used to draw the bitmap
1462 int width, int height, boolean hasAlpha, @Nullable Paint paint) {
1485 paint != null ? paint.mNativePaint : 0);
1498 int width, int height, boolean hasAlpha, @Nullable Paint paint) {
1501 hasAlpha, paint);
1509 * @param paint May be null. The paint used to draw the bitmap
1511 public void drawBitmap(@NonNull Bitmap bitmap, @NonNull Matrix matrix, @Nullable Paint paint) {
1513 paint != null ? paint.mNativePaint : 0);
1549 * @param paint May be null. The paint used to draw the bitmap
1553 @Nullable Paint paint) {
1569 paint != null ? paint.mNativePaint : 0);
1591 * coordinates to use at each vertex (the paint must have a shader in this
1615 * @param paint Specifies the shader to use if the texs array is non-null.
1620 @NonNull Paint paint) {
1633 indices, indexOffset, indexCount, paint.mNativePaint);
1637 * Draw the text, with origin at (x,y), using the specified paint. The
1638 * origin is interpreted based on the Align setting in the paint.
1643 * @param paint The paint used for the text (e.g. color, size, style)
1646 @NonNull Paint paint) {
1651 native_drawText(mNativeCanvasWrapper, text, index, count, x, y, paint.mBidiFlags,
1652 paint.mNativePaint, paint.mNativeTypeface);
1656 * Draw the text, with origin at (x,y), using the specified paint. The
1657 * origin is interpreted based on the Align setting in the paint.
1662 * @param paint The paint used for the text (e.g. color, size, style)
1664 public void drawText(@NonNull String text, float x, float y, @NonNull Paint paint) {
1665 native_drawText(mNativeCanvasWrapper, text, 0, text.length(), x, y, paint.mBidiFlags,
1666 paint.mNativePaint, paint.mNativeTypeface);
1670 * Draw the text, with origin at (x,y), using the specified paint.
1671 * The origin is interpreted based on the Align setting in the paint.
1678 * @param paint The paint used for the text (e.g. color, size, style)
1681 @NonNull Paint paint) {
1685 native_drawText(mNativeCanvasWrapper, text, start, end, x, y, paint.mBidiFlags,
1686 paint.mNativePaint, paint.mNativeTypeface);
1700 * @param paint The paint used for the text (e.g. color, size, style)
1703 @NonNull Paint paint) {
1710 paint.mBidiFlags, paint.mNativePaint, paint.mNativeTypeface);
1713 paint);
1718 paint.mBidiFlags, paint.mNativePaint, paint.mNativeTypeface);
1740 * @param paint the paint
1744 int contextCount, float x, float y, boolean isRtl, @NonNull Paint paint) {
1749 if (paint == null) {
1750 throw new NullPointerException("paint is null");
1757 contextIndex, contextCount, x, y, isRtl, paint.mNativePaint, paint.mNativeTypeface);
1774 * @param paint the paint
1778 int contextEnd, float x, float y, boolean isRtl, @NonNull Paint paint) {
1783 if (paint == null) {
1784 throw new NullPointerException("paint is null");
1793 contextStart, contextEnd, x, y, isRtl, paint.mNativePaint, paint.mNativeTypeface);
1796 contextStart, contextEnd, x, y, isRtl, paint);
1803 0, contextLen, x, y, isRtl, paint.mNativePaint, paint.mNativeTypeface);
1821 * @param paint The paint used for the text (e.g. color, size, style)
1825 @NonNull Paint paint) {
1830 drawText(text, index + i, 1, pos[i * 2], pos[i * 2 + 1], paint);
1844 * @param paint The paint used for the text (e.g. color, size, style)
1847 public void drawPosText(@NonNull String text, @NonNull float[] pos, @NonNull Paint paint) {
1848 drawPosText(text.toCharArray(), 0, text.length(), pos, paint);
1852 * Draw the text, with origin at (x,y), using the specified paint, along
1853 * the specified path. The paint's Align setting determins where along the
1862 * @param paint The paint used for the text (e.g. color, size, style)
1865 float hOffset, float vOffset, @NonNull Paint paint) {
1871 paint.mBidiFlags, paint.mNativePaint, paint.mNativeTypeface);
1875 * Draw the text, with origin at (x,y), using the specified paint, along
1876 * the specified path. The paint's Align setting determins where along the
1885 * @param paint The paint used for the text (e.g. color, size, style)
1888 float vOffset, @NonNull Paint paint) {
1891 paint.mBidiFlags, paint.mNativePaint, paint.mNativeTypeface);