SweepGradient_Delegatepublic class SweepGradient_Delegate extends Gradient_Delegate Delegate implementing the native methods of android.graphics.SweepGradient
Through the layoutlib_create tool, the original native methods of SweepGradient 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 SweepGradient 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 SweepGradient_Delegate(float cx, float cy, int[] colors, float[] positions)A subclass of Shader that draws a sweep gradient around a center point.
super(colors, positions);
mJavaPaint = new SweepGradientPaint(cx, cy, mColors, mPositions);
|
Methods Summary |
---|
public java.awt.Paint | getJavaPaint()
return mJavaPaint;
| static long | nativeCreate1(float x, float y, int[] colors, float[] positions)
SweepGradient_Delegate newDelegate = new SweepGradient_Delegate(x, y, colors, positions);
return sManager.addNewDelegate(newDelegate);
| static long | nativeCreate2(float x, float y, int color0, int color1)
return nativeCreate1(x, y, new int[] { color0, color1 }, null /*positions*/);
|
|