Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6f9c9792 authored by Nolan Scobie's avatar Nolan Scobie Committed by Automerger Merge Worker
Browse files

Merge "docs: Note that antialiasing is not supported on multiple Canvas draw...

Merge "docs: Note that antialiasing is not supported on multiple Canvas draw ops" into tm-dev am: 3b5f7cb4 am: 7b351a48

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20376185



Change-Id: If89172b1bdc4d6e75f0eaac3c3467924b8c8a6bc
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents e75afe61 7b351a48
Loading
Loading
Loading
Loading
+18 −5
Original line number Diff line number Diff line
@@ -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
@@ -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,
@@ -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);
@@ -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);
@@ -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
@@ -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,
+7 −0
Original line number Diff line number Diff line
@@ -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)
     */