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) |
@NonNull 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)
PromptBackgroundsetColour in class PromptBackgroundcolour - Colour integer representing the colour.public void prepare(@NonNull
PromptOptions options,
boolean clipToBounds,
@NonNull
android.graphics.Rect clipBounds)
PromptBackgroundprepare in class PromptBackgroundoptions - 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 prompt,
float revealModifier,
float alphaModifier)
public void draw(@NonNull
android.graphics.Canvas canvas)
public boolean contains(float x,
float y)