public abstract class PromptBackground
extends java.lang.Object
Constructor and Description |
---|
PromptBackground() |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(float x,
float y)
Does the element contain the point.
|
void |
draw(android.graphics.Canvas canvas)
Draw the element.
|
abstract void |
prepare(PromptOptions options,
boolean clipToBounds,
android.graphics.Rect clipBounds)
Prepares the background for drawing.
|
abstract void |
setColour(int colour)
Sets the colour to use for the background.
|
void |
update(PromptOptions options,
float revealModifier,
float alphaModifier)
Update the current prompt rendering state based on the prompt options and current reveal & alpha scales.
|
public abstract void setColour(int colour)
colour
- Colour integer representing the colour.public abstract void prepare(@NonNull PromptOptions options, boolean clipToBounds, @NonNull android.graphics.Rect clipBounds)
options
- The options from which the prompt was created.clipToBounds
- Should the prompt be clipped to the supplied clipBounds.clipBounds
- The bounds to clip the drawing to.public void update(@NonNull PromptOptions options, float revealModifier, float alphaModifier)
options
- The options used to create the prompt.revealModifier
- The current size/revealed scale from 0 - 1.alphaModifier
- The current colour alpha scale from 0 - 1.public void draw(@NonNull android.graphics.Canvas canvas)
canvas
- The canvas to draw to.public boolean contains(float x, float y)
x
- x coordinate.y
- y coordinate.