From 394d6432c3c78078466df7161e4fe836749b4ac0 Mon Sep 17 00:00:00 2001 From: Nader Jawad Date: Thu, 15 Oct 2020 15:42:58 -0700 Subject: [PATCH] Update Shader.TileMode documentation. Updated documentation for TileModel.DECAL to indicate that "original domain" refers to the bounds of the shader and transparent black will be drawn for regions outsdie of the shader. Fixes: 169331275 Test: N/A Change-Id: I6afdf4354668197cd7f584071fc35f80e07053fe --- graphics/java/android/graphics/Shader.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/graphics/java/android/graphics/Shader.java b/graphics/java/android/graphics/Shader.java index d71ff1138b252..7651d019bdcbf 100644 --- a/graphics/java/android/graphics/Shader.java +++ b/graphics/java/android/graphics/Shader.java @@ -83,21 +83,22 @@ public class Shader { public enum TileMode { /** - * replicate the edge color if the shader draws outside of its - * original bounds + * Replicate the edge color if the shader draws outside of its + * original bounds. */ CLAMP (0), /** - * repeat the shader's image horizontally and vertically + * Repeat the shader's image horizontally and vertically. */ REPEAT (1), /** - * repeat the shader's image horizontally and vertically, alternating - * mirror images so that adjacent images always seam + * Repeat the shader's image horizontally and vertically, alternating + * mirror images so that adjacent images always seam. */ MIRROR(2), /** - * Only draw within the original domain, return transparent-black everywhere else + * Render the shader's image pixels only within its original bounds. If the shader + * draws outside of its original bounds, transparent black is drawn instead. */ DECAL(3);