CircleArcControlDrawer

A ControlDrawer that draws a circle accompanied by an arc.

Constructors

Types

Link copied to clipboard
public interface BeforeDraw

Interface to call before drawing the circle and arc.

Link copied to clipboard

Properties

Link copied to clipboard
Link copied to clipboard
private final Circle arcCircle

A Circle representation for the arc position.

Link copied to clipboard

The interface to call before drawing the circle or arc.

Link copied to clipboard

The circle drawer.

Link copied to clipboard
private final ColorsScheme colors

The drawer colors.

Link copied to clipboard
private final IntArray colorsArray

An IntArray of the current colors properties.

Link copied to clipboard
private final Paint paint

The drawer paint.

Link copied to clipboard
Link copied to clipboard
private Float ratio
Link copied to clipboard
Link copied to clipboard
private Float sweepAngle

Functions

Link copied to clipboard
public Unit draw(Canvas canvas, Control control)

Draw the control representation.

Link copied to clipboard
protected Unit drawArc(Canvas canvas, Control control, Float startArcAngle)

Draws the arc shape.

Link copied to clipboard
protected Unit drawArrow(Canvas canvas, Control control, Double angle)

Draws the arc arrow in the center of the arc pointing outward.

Link copied to clipboard
protected Unit drawShapes(Canvas canvas, Control control)

Draws the arc and arc arrow shapes.

Link copied to clipboard

Gets the accent color of colors.

Link copied to clipboard
protected Circle getArcCircle()

A Circle representation for the arc position.

Link copied to clipboard

The interface to call before drawing the circle or arc.

Link copied to clipboard

The circle drawer.

Link copied to clipboard
protected final ColorsScheme getColors()
Link copied to clipboard
protected final IntArray getColorsArray()
Link copied to clipboard
protected Double getDistance(Control control)

Gets the distance value between the arc position and the control center.

Link copied to clipboard
protected RectF getOval(Control control)

The bounds of oval used to define the shape and size of the arc.

Link copied to clipboard
protected final Paint getPaint()
Link copied to clipboard
protected Shader getPaintShader(Control control, Double angle, Double startAngle)

The Shader for the drawer paint.

Link copied to clipboard

Gets the primary color of colors.

Link copied to clipboard
public final Float getRatio()

Gets the circle radius ratio.

Link copied to clipboard
public final Float getStrokeWidth()

Gets the stroke width of the paint.

Link copied to clipboard
public final Float getSweepAngle()

Gets the arc sweep angle.

Link copied to clipboard
public Unit setAccentColor(Integer accentColor)

Sets the accent color of colors.

Link copied to clipboard
public Unit setColors(ColorsScheme colors)

Sets the primary and accent colors of drawer based on a schema.

public Unit setColors(@ColorInt() Integer primary, @ColorInt() Integer accent)

Sets the primary and accent colors of drawer.

Link copied to clipboard
public Unit setPrimaryColor(Integer primaryColor)

Sets the primary color of colors and paint.

Link copied to clipboard
public final Unit setRatio(Float ratio)

Sets the circle radius ratio.

Link copied to clipboard
public final Unit setStrokeWidth(Float strokeWidth)

Sets the stroke width of the paint.

Link copied to clipboard
public final Unit setSweepAngle(Float sweepAngle)

Sets the arc sweep angle.