Loading graphics/java/android/graphics/Canvas.java +18 −5 Original line number Diff line number Diff line Loading @@ -1667,6 +1667,9 @@ public class Canvas extends BaseCanvas { * effectively treating them as zeros. In API level {@value Build.VERSION_CODES#P} and above * these parameters will be respected. * * <p>Note: antialiasing is not supported, therefore {@link Paint#ANTI_ALIAS_FLAG} is * ignored.</p> * * @param bitmap The bitmap to draw using the mesh * @param meshWidth The number of columns in the mesh. Nothing is drawn if this is 0 * @param meshHeight The number of rows in the mesh. Nothing is drawn if this is 0 Loading @@ -1678,7 +1681,7 @@ public class Canvas extends BaseCanvas { * null, there must be at least (meshWidth+1) * (meshHeight+1) + colorOffset values * in the array. * @param colorOffset Number of color elements to skip before drawing * @param paint May be null. The paint used to draw the bitmap * @param paint May be null. The paint used to draw the bitmap. Antialiasing is not supported. */ public void drawBitmapMesh(@NonNull Bitmap bitmap, int meshWidth, int meshHeight, @NonNull float[] verts, int vertOffset, @Nullable int[] colors, int colorOffset, Loading Loading @@ -1832,9 +1835,12 @@ public class Canvas extends BaseCanvas { /** * Draws the specified bitmap as an N-patch (most often, a 9-patch.) * * <p>Note: antialiasing is not supported, therefore {@link Paint#ANTI_ALIAS_FLAG} is * ignored.</p> * * @param patch The ninepatch object to render * @param dst The destination rectangle. * @param paint The paint to draw the bitmap with. may be null * @param paint The paint to draw the bitmap with. May be null. Antialiasing is not supported. */ public void drawPatch(@NonNull NinePatch patch, @NonNull Rect dst, @Nullable Paint paint) { super.drawPatch(patch, dst, paint); Loading @@ -1843,9 +1849,12 @@ public class Canvas extends BaseCanvas { /** * Draws the specified bitmap as an N-patch (most often, a 9-patch.) * * <p>Note: antialiasing is not supported, therefore {@link Paint#ANTI_ALIAS_FLAG} is * ignored.</p> * * @param patch The ninepatch object to render * @param dst The destination rectangle. * @param paint The paint to draw the bitmap with. may be null * @param paint The paint to draw the bitmap with. May be null. Antialiasing is not supported. */ public void drawPatch(@NonNull NinePatch patch, @NonNull RectF dst, @Nullable Paint paint) { super.drawPatch(patch, dst, paint); Loading Loading @@ -2278,6 +2287,9 @@ public class Canvas extends BaseCanvas { * array is optional, but if it is present, then it is used to specify the index of each * triangle, rather than just walking through the arrays in order. * * <p>Note: antialiasing is not supported, therefore {@link Paint#ANTI_ALIAS_FLAG} is * ignored.</p> * * @param mode How to interpret the array of vertices * @param vertexCount The number of values in the vertices array (and corresponding texs and * colors arrays if non-null). Each logical vertex is two values (x, y), vertexCount Loading @@ -2292,8 +2304,9 @@ public class Canvas extends BaseCanvas { * @param colorOffset Number of values in colors to skip before drawing. * @param indices If not null, array of indices to reference into the vertex (texs, colors) * array. * @param indexCount number of entries in the indices array (if not null). * @param paint Specifies the shader to use if the texs array is non-null. * @param indexCount Number of entries in the indices array (if not null). * @param paint Specifies the shader to use if the texs array is non-null. Antialiasing is not * supported. */ public void drawVertices(@NonNull VertexMode mode, int vertexCount, @NonNull float[] verts, int vertOffset, @Nullable float[] texs, int texOffset, @Nullable int[] colors, Loading graphics/java/android/graphics/Paint.java +7 −0 Original line number Diff line number Diff line Loading @@ -137,6 +137,13 @@ public class Paint { * <p>Enabling this flag will cause all draw operations that support * antialiasing to use it.</p> * * <p>Notable draw operations that do <b>not</b> support antialiasing include:</p> * <ul> * <li>{@link android.graphics.Canvas#drawBitmapMesh}</li> * <li>{@link android.graphics.Canvas#drawPatch}</li> * <li>{@link android.graphics.Canvas#drawVertices}</li> * </ul> * * @see #Paint(int) * @see #setFlags(int) */ Loading Loading
graphics/java/android/graphics/Canvas.java +18 −5 Original line number Diff line number Diff line Loading @@ -1667,6 +1667,9 @@ public class Canvas extends BaseCanvas { * effectively treating them as zeros. In API level {@value Build.VERSION_CODES#P} and above * these parameters will be respected. * * <p>Note: antialiasing is not supported, therefore {@link Paint#ANTI_ALIAS_FLAG} is * ignored.</p> * * @param bitmap The bitmap to draw using the mesh * @param meshWidth The number of columns in the mesh. Nothing is drawn if this is 0 * @param meshHeight The number of rows in the mesh. Nothing is drawn if this is 0 Loading @@ -1678,7 +1681,7 @@ public class Canvas extends BaseCanvas { * null, there must be at least (meshWidth+1) * (meshHeight+1) + colorOffset values * in the array. * @param colorOffset Number of color elements to skip before drawing * @param paint May be null. The paint used to draw the bitmap * @param paint May be null. The paint used to draw the bitmap. Antialiasing is not supported. */ public void drawBitmapMesh(@NonNull Bitmap bitmap, int meshWidth, int meshHeight, @NonNull float[] verts, int vertOffset, @Nullable int[] colors, int colorOffset, Loading Loading @@ -1832,9 +1835,12 @@ public class Canvas extends BaseCanvas { /** * Draws the specified bitmap as an N-patch (most often, a 9-patch.) * * <p>Note: antialiasing is not supported, therefore {@link Paint#ANTI_ALIAS_FLAG} is * ignored.</p> * * @param patch The ninepatch object to render * @param dst The destination rectangle. * @param paint The paint to draw the bitmap with. may be null * @param paint The paint to draw the bitmap with. May be null. Antialiasing is not supported. */ public void drawPatch(@NonNull NinePatch patch, @NonNull Rect dst, @Nullable Paint paint) { super.drawPatch(patch, dst, paint); Loading @@ -1843,9 +1849,12 @@ public class Canvas extends BaseCanvas { /** * Draws the specified bitmap as an N-patch (most often, a 9-patch.) * * <p>Note: antialiasing is not supported, therefore {@link Paint#ANTI_ALIAS_FLAG} is * ignored.</p> * * @param patch The ninepatch object to render * @param dst The destination rectangle. * @param paint The paint to draw the bitmap with. may be null * @param paint The paint to draw the bitmap with. May be null. Antialiasing is not supported. */ public void drawPatch(@NonNull NinePatch patch, @NonNull RectF dst, @Nullable Paint paint) { super.drawPatch(patch, dst, paint); Loading Loading @@ -2278,6 +2287,9 @@ public class Canvas extends BaseCanvas { * array is optional, but if it is present, then it is used to specify the index of each * triangle, rather than just walking through the arrays in order. * * <p>Note: antialiasing is not supported, therefore {@link Paint#ANTI_ALIAS_FLAG} is * ignored.</p> * * @param mode How to interpret the array of vertices * @param vertexCount The number of values in the vertices array (and corresponding texs and * colors arrays if non-null). Each logical vertex is two values (x, y), vertexCount Loading @@ -2292,8 +2304,9 @@ public class Canvas extends BaseCanvas { * @param colorOffset Number of values in colors to skip before drawing. * @param indices If not null, array of indices to reference into the vertex (texs, colors) * array. * @param indexCount number of entries in the indices array (if not null). * @param paint Specifies the shader to use if the texs array is non-null. * @param indexCount Number of entries in the indices array (if not null). * @param paint Specifies the shader to use if the texs array is non-null. Antialiasing is not * supported. */ public void drawVertices(@NonNull VertexMode mode, int vertexCount, @NonNull float[] verts, int vertOffset, @Nullable float[] texs, int texOffset, @Nullable int[] colors, Loading
graphics/java/android/graphics/Paint.java +7 −0 Original line number Diff line number Diff line Loading @@ -137,6 +137,13 @@ public class Paint { * <p>Enabling this flag will cause all draw operations that support * antialiasing to use it.</p> * * <p>Notable draw operations that do <b>not</b> support antialiasing include:</p> * <ul> * <li>{@link android.graphics.Canvas#drawBitmapMesh}</li> * <li>{@link android.graphics.Canvas#drawPatch}</li> * <li>{@link android.graphics.Canvas#drawVertices}</li> * </ul> * * @see #Paint(int) * @see #setFlags(int) */ Loading