RadialGradient_Delegate.javaAPI DocAndroid 5.1 API7880Thu Mar 12 22:22:44 GMT


public class RadialGradient_Delegate extends Gradient_Delegate
Delegate implementing the native methods of 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
Constructors Summary
private RadialGradient_Delegate(float x, float y, float radius, int[] colors, float[] positions, tile)
Create a shader that draws a radial gradient given the center and radius.

x The x-coordinate of the center of the radius
y The y-coordinate of the center of the radius
radius Must be positive. The radius of the circle for this gradient
colors The colors to be distributed between the center and edge of the circle
positions May be NULL. The relative position of each corresponding color in the colors array. If this is NULL, the the colors are distributed evenly between the center and edge of the circle.
tile The Shader tiling mode

        super(colors, positions);
        mJavaPaint = new RadialGradientPaint(x, y, radius, mColors, mPositions, tile);
Methods Summary
public java.awt.PaintgetJavaPaint()

        return mJavaPaint;
static longnativeCreate1(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 longnativeCreate2(float x, float y, float radius, int color0, int color1, int tileMode)

        return nativeCreate1(x, y, radius, new int[] { color0, color1 }, null /*positions*/,