public interface

IPaintingView

com.htc.painting.engine.IPaintingView
Known Indirect Subclasses

Class Overview

The IPaintingView interface represents a view that provides some basic drawing operations such as: - draw strokes - draw strokes with different textures - undo/redo

Summary

Nested Classes
interface IPaintingView.OnPaintingViewListener Interface definition for a callback to be invoked when an PaintingView event occurs. 
Public Methods
abstract boolean canRedo()
Indicates whether redo operation can be performed on this HtcPaintingView.
abstract boolean canUndo()
Indicates whether undo operation can be performed on this HtcPaintingView.
abstract void clearAll()
Clear all strokes from this HtcPaitingView.
abstract void enablePainting(boolean enable)
To show/hide strokes
abstract StrokeProperties getStrokeProperties()
Get current StrokeProperties
abstract boolean isPaintingEnable()
true if HtcPainting is enabled
abstract void redo()
redo previous undo action
abstract void removeOnPaintingViewListener(IPaintingView.OnPaintingViewListener listener)
removes a registered OnPaintingViewListener from further event callbacks.
abstract void setDisplayAlpha(int alpha)
Apply specified alpha value on strokes
abstract void setOnPaintingViewListener(IPaintingView.OnPaintingViewListener listener)
Register a callback to be invoked when an PaintingView event occurs.
abstract void setPen(Pen p, StrokeProperties defaultProperties)
abstract void setStrokeProperties(StrokeProperties p)
Set as current HtcPainting StrokeProperties.
abstract void undo()
undo previous drawing action

Public Methods

public abstract boolean canRedo ()

Since: API Level 2.0

Indicates whether redo operation can be performed on this HtcPaintingView.

Returns
  • true if it is a valid redo state

public abstract boolean canUndo ()

Since: API Level 2.0

Indicates whether undo operation can be performed on this HtcPaintingView.

Returns
  • true if it is a valid undo state

public abstract void clearAll ()

Since: API Level 2.0

Clear all strokes from this HtcPaitingView.

public abstract void enablePainting (boolean enable)

Since: API Level 2.0

To show/hide strokes

public abstract StrokeProperties getStrokeProperties ()

Since: API Level 2.0

Get current StrokeProperties

Returns
  • the currentStrokeProperties

public abstract boolean isPaintingEnable ()

Since: API Level 2.0

true if HtcPainting is enabled

public abstract void redo ()

Since: API Level 2.0

redo previous undo action

public abstract void removeOnPaintingViewListener (IPaintingView.OnPaintingViewListener listener)

Since: API Level 2.0

removes a registered OnPaintingViewListener from further event callbacks.

Parameters
listener the callback to be removed

public abstract void setDisplayAlpha (int alpha)

Since: API Level 2.0

Apply specified alpha value on strokes

public abstract void setOnPaintingViewListener (IPaintingView.OnPaintingViewListener listener)

Since: API Level 2.0

Register a callback to be invoked when an PaintingView event occurs.

Parameters
listener the callback to be run on

public abstract void setPen (Pen p, StrokeProperties defaultProperties)

Since: API Level 2.0

public abstract void setStrokeProperties (StrokeProperties p)

Since: API Level 2.0

Set as current HtcPainting StrokeProperties. These properties will determine how the pen stroke is drawn.

Parameters
p the StrokeProperties to be used when drawing a stroke

public abstract void undo ()

Since: API Level 2.0

undo previous drawing action