public class

StrokeProperties

extends Object
java.lang.Object
   ↳ com.htc.painting.engine.StrokeProperties

Class Overview

This class defines the set of current drawing properties. (ex. stroke width, color, etc) The actualy stroke tecture depends on the current StrokeProperties and currently used Pen.

Summary

Fields
protected int mAlpha
protected int mBlurRadius
protected Paint.Cap mCap
protected int mColor
protected boolean mIsEraser
protected MaskFilter mMaskFilter
protected float mWidth
Public Constructors
StrokeProperties()
StrokeProperties(StrokeProperties p)
Public Methods
int getAlpha()
int getBlurRadius()
Paint.Cap getCap()
int getColor()
MaskFilter getMaskFilter()
float getWidth()
boolean isEraser()
void setAlpha(int alpha)
void setBlurRadius(int radius)
void setCap(Paint.Cap cap)
void setColor(int color)
void setEraser(boolean isEraser)
void setMaskFilter(MaskFilter filter)
void setWidth(float width)
[Expand]
Inherited Methods
From class java.lang.Object

Fields

protected int mAlpha

Since: API Level 2.0

protected int mBlurRadius

Since: API Level 2.0

protected Paint.Cap mCap

Since: API Level 2.0

protected int mColor

Since: API Level 2.0

protected boolean mIsEraser

Since: API Level 2.0

protected MaskFilter mMaskFilter

Since: API Level 2.0

protected float mWidth

Since: API Level 2.0

Public Constructors

public StrokeProperties ()

Since: API Level 2.0

public StrokeProperties (StrokeProperties p)

Since: API Level 2.0

Public Methods

public int getAlpha ()

Since: API Level 2.0

Returns
  • alpha value from 0~255

public int getBlurRadius ()

Since: API Level 2.0

public Paint.Cap getCap ()

Since: API Level 2.0

public int getColor ()

Since: API Level 2.0

public MaskFilter getMaskFilter ()

Since: API Level 2.0

public float getWidth ()

Since: API Level 2.0

public boolean isEraser ()

Since: API Level 2.0

public void setAlpha (int alpha)

Since: API Level 2.0

Parameters
alpha from 0~255

public void setBlurRadius (int radius)

Since: API Level 2.0

public void setCap (Paint.Cap cap)

Since: API Level 2.0

public void setColor (int color)

Since: API Level 2.0

public void setEraser (boolean isEraser)

Since: API Level 2.0

public void setMaskFilter (MaskFilter filter)

Since: API Level 2.0

public void setWidth (float width)

Since: API Level 2.0