RadialGradient_Delegatepublic class RadialGradient_Delegate extends Gradient_Delegate Delegate implementing the native methods of android.graphics.RadialGradient
Through the layoutlib_create tool, the original native methods of RadialGradient have been
replaced by calls to methods of the same name in this delegate class.
This class behaves like the original native implementation, but in Java, keeping previously
native data into its own objects and mapping them to int that are sent back and forth between
it and the original RadialGradient class.
Because this extends {@link Shader_Delegate}, there's no need to use a {@link DelegateManager},
as all the Shader classes will be added to the manager owned by {@link Shader_Delegate}. |
Fields Summary |
---|
private Paint | mJavaPaint |
Constructors Summary |
---|
private RadialGradient_Delegate(float x, float y, float radius, int[] colors, float[] positions, android.graphics.Shader.TileMode tile)Create a shader that draws a radial gradient given the center and radius.
super(colors, positions);
mJavaPaint = new RadialGradientPaint(x, y, radius, mColors, mPositions, tile);
|
Methods Summary |
---|
public java.awt.Paint | getJavaPaint()
return mJavaPaint;
| static long | nativeCreate1(float x, float y, float radius, int[] colors, float[] positions, int tileMode)
RadialGradient_Delegate newDelegate = new RadialGradient_Delegate(x, y, radius,
colors, positions, Shader_Delegate.getTileMode(tileMode));
return sManager.addNewDelegate(newDelegate);
| static long | nativeCreate2(float x, float y, float radius, int color0, int color1, int tileMode)
return nativeCreate1(x, y, radius, new int[] { color0, color1 }, null /*positions*/,
tileMode);
|
|