public class RectanglePromptBackground extends PromptBackground
PromptBackground
implementation that renders the prompt background as a rectangle.Constructor and Description |
---|
RectanglePromptBackground()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(float x,
float y) |
void |
draw(android.graphics.Canvas canvas) |
void |
prepare(PromptOptions options,
boolean clipToBounds,
android.graphics.Rect clipBounds)
Prepares the background for drawing.
|
void |
setColour(int colour)
Sets the colour to use for the background.
|
RectanglePromptBackground |
setCornerRadius(float rx,
float ry)
Set the radius for the rectangle corners.
|
void |
update(PromptOptions prompt,
float revealModifier,
float alphaModifier) |
public RectanglePromptBackground setCornerRadius(float rx, float ry)
rx
- The x-radius of the oval used to round the cornersry
- The y-radius of the oval used to round the cornerspublic void setColour(int colour)
PromptBackground
setColour
in class PromptBackground
colour
- Colour integer representing the colour.public void prepare(PromptOptions options, boolean clipToBounds, android.graphics.Rect clipBounds)
PromptBackground
prepare
in class PromptBackground
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(PromptOptions prompt, float revealModifier, float alphaModifier)
public void draw(android.graphics.Canvas canvas)
public boolean contains(float x, float y)