public class

EraserStroke

extends Stroke
java.lang.Object
   ↳ com.htc.painting.engine.stroke.Stroke
     ↳ com.htc.painting.engine.stroke.EraserStroke

Class Overview

An eraser stroke

Summary

[Expand]
Inherited Constants
From class com.htc.painting.engine.stroke.Stroke
[Expand]
Inherited Fields
From class com.htc.painting.engine.stroke.Stroke
Public Constructors
EraserStroke(int id)
EraserStroke(int id, StrokeProperties sp)
EraserStroke(int id, ByteArrayInputStream is)
for serialize
Public Methods
Stroke create(List<MotionPoint> points)
int deserialize(ByteArrayInputStream is)
void draw(Canvas canvas, int startIndex, int endIndex)
if stroke support partial render.
void draw(Canvas canvas)
int getTotalBytes()
if stroke could provide memory information, override this function
boolean serialize(ByteArrayOutputStream os)
Protected Methods
void onEnd(Canvas canvas, RectF dirtyRect)
Implement this to customized your own data
void onMove(Canvas canvas, float x, float y, float pressure, float size, RectF dirtyRect)
Implement this to customized your own data
void updateBoundingRect(RectF dirtyRect)
[Expand]
Inherited Methods
From class com.htc.painting.engine.stroke.Stroke
From class java.lang.Object

Public Constructors

public EraserStroke (int id)

Since: API Level 2.0

public EraserStroke (int id, StrokeProperties sp)

Since: API Level 2.0

public EraserStroke (int id, ByteArrayInputStream is)

Since: API Level 2.0

for serialize

Public Methods

public Stroke create (List<MotionPoint> points)

Since: API Level 4.0

public int deserialize (ByteArrayInputStream is)

Since: API Level 2.0

Throws
IOException

public void draw (Canvas canvas, int startIndex, int endIndex)

Since: API Level 2.0

if stroke support partial render. override this function

public void draw (Canvas canvas)

Since: API Level 2.0

public int getTotalBytes ()

Since: API Level 2.0

if stroke could provide memory information, override this function

public boolean serialize (ByteArrayOutputStream os)

Since: API Level 2.0

Throws
IOException

Protected Methods

protected void onEnd (Canvas canvas, RectF dirtyRect)

Since: API Level 2.0

Implement this to customized your own data

protected void onMove (Canvas canvas, float x, float y, float pressure, float size, RectF dirtyRect)

Since: API Level 2.0

Implement this to customized your own data

protected void updateBoundingRect (RectF dirtyRect)

Since: API Level 2.0