-
- All Implemented Interfaces:
-
com.jackpocket.scratchoff.paths.ScratchPathPointsAggregator
public class ScratchPathManager implements ScratchPathPointsAggregator
-
-
Field Summary
Fields Modifier and Type Field Description private floatscaleprivate booleanactivePathRecoveryEnabled
-
Constructor Summary
Constructors Constructor Description ScratchPathManager()
-
Method Summary
Modifier and Type Method Description ScratchPathManagersetScale(float scale)ScratchPathManagersetActivePathRecoveryEnabled(boolean activePathRecoveryEnabled)voidaddScratchPathPoints(Collection<ScratchPathPoint> events)voidaddScratchPathPoint(ScratchPathPoint event)voiddrawAndReset(Canvas canvas, Paint paint)Draw the current Path segments and reset them to an empty state. voidclear()static PaintcreateBaseScratchoffPaint(int touchRadiusPx)-
-
Method Detail
-
setScale
ScratchPathManager setScale(float scale)
-
setActivePathRecoveryEnabled
ScratchPathManager setActivePathRecoveryEnabled(boolean activePathRecoveryEnabled)
-
addScratchPathPoints
void addScratchPathPoints(Collection<ScratchPathPoint> events)
-
addScratchPathPoint
void addScratchPathPoint(ScratchPathPoint event)
-
drawAndReset
void drawAndReset(Canvas canvas, Paint paint)
Draw the current Path segments and reset them to an empty state.
- Parameters:
canvas- The Canvas to draw the un-rendered path segments topaint- The paint to draw the un-rendered paths segments with
-
clear
void clear()
-
createBaseScratchoffPaint
static Paint createBaseScratchoffPaint(int touchRadiusPx)
-
-
-
-