summaryrefslogtreecommitdiffstats
path: root/graphics/java
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2010-09-21 16:50:50 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-09-21 16:50:50 -0700
commit76f609118574a76b10cb90bcf061b15546bc38ee (patch)
tree0eef87cd6a9fafa0665e48aec7a1ed65e4e5b8e3 /graphics/java
parent6bfc93cdd3639de37876776eb2ebd6284327610b (diff)
parentddb80bebb0776e6d852aab6e8bba5d5591847a55 (diff)
downloadframeworks_base-76f609118574a76b10cb90bcf061b15546bc38ee.zip
frameworks_base-76f609118574a76b10cb90bcf061b15546bc38ee.tar.gz
frameworks_base-76f609118574a76b10cb90bcf061b15546bc38ee.tar.bz2
Merge "Add support for circular gradients to the GL renderer."
Diffstat (limited to 'graphics/java')
-rw-r--r--graphics/java/android/graphics/RadialGradient.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/graphics/java/android/graphics/RadialGradient.java b/graphics/java/android/graphics/RadialGradient.java
index b4e902d..897762c 100644
--- a/graphics/java/android/graphics/RadialGradient.java
+++ b/graphics/java/android/graphics/RadialGradient.java
@@ -40,6 +40,8 @@ public class RadialGradient extends Shader {
throw new IllegalArgumentException("color and position arrays must be of equal length");
}
native_instance = nativeCreate1(x, y, radius, colors, positions, tile.nativeInt);
+ native_shader = nativePostCreate1(native_instance, x, y, radius, colors, positions,
+ tile.nativeInt);
}
/** Create a shader that draws a radial gradient given the center and radius.
@@ -56,11 +58,18 @@ public class RadialGradient extends Shader {
throw new IllegalArgumentException("radius must be > 0");
}
native_instance = nativeCreate2(x, y, radius, color0, color1, tile.nativeInt);
+ native_shader = nativePostCreate2(native_instance, x, y, radius, color0, color1,
+ tile.nativeInt);
}
private static native int nativeCreate1(float x, float y, float radius,
- int colors[], float positions[], int tileMode);
+ int colors[], float positions[], int tileMode);
private static native int nativeCreate2(float x, float y, float radius,
- int color0, int color1, int tileMode);
+ int color0, int color1, int tileMode);
+
+ private static native int nativePostCreate1(int native_shader, float x, float y, float radius,
+ int colors[], float positions[], int tileMode);
+ private static native int nativePostCreate2(int native_shader, float x, float y, float radius,
+ int color0, int color1, int tileMode);
}