| java.lang.Object |
| ↳ |
com.htc.painting.engine.HtcPaintingUtil |
Class Overview
This class provides some drawing utilities.
Summary
| Public Methods |
| static int |
byteArrayToInt(byte[]
bytes) |
| static short |
byteArrayToShort(byte[]
bytes) |
| static long |
byteArraytoLong(byte[]
bytes) |
| static Paint |
convertToPaint(StrokeProperties
dp) |
| static boolean |
drawUtil(Bitmap
bitmap, int[] groupIds, ViewPort[]
viewPorts, AbsSerializeDAO
serializeDAO)
static methods to draw strokes on bitmap.
|
| static boolean |
drawUtil(Bitmap
bitmap, int groupId, int strokeId, ViewPort
viewPort, AbsSerializeDAO
serializeDAO)
static methods to draw strokes on bitmap.
|
| static boolean |
drawUtil(Bitmap
bitmap, int groupId, ViewPort
viewPort, AbsSerializeDAO
serializeDAO)
static methods to draw strokes on bitmap.
|
| static Paint |
getClearPaint()
|
| static float[] |
getInvertedPoint(float[]
originalPoint, Matrix matrix)
This function takes an point (ex.
|
| static byte[] |
intToByteArray(int
value) |
| static void |
intToByteArray(int
value, byte[] dest) |
| static byte[] |
longToByteArray(long
value) |
| static void |
longToByteArray(long
value, byte[] dest) |
| static void |
shortToByteArray(short
value, byte[] dest) |
| static byte[] |
shortToByteArray(short
value) |
| [Expand]
Inherited Methods
|
From class java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final Class<?>
|
getClass()
|
int
|
hashCode()
|
final void
|
notify()
|
final void
|
notifyAll()
|
String
|
toString()
|
final void
|
wait()
|
final void
|
wait(long arg0, int arg1)
|
final void
|
wait(long arg0)
|
|
Public Constructors
public HtcPaintingUtil ()
Public Methods
public static int
byteArrayToInt (byte[]
bytes)
public static
short byteArrayToShort (byte[] bytes)
public static long
byteArraytoLong (byte[] bytes)
public static
boolean drawUtil (Bitmap bitmap, int[] groupIds, ViewPort[]
viewPorts, AbsSerializeDAO
serializeDAO)
static methods to draw strokes on bitmap.
Parameters
| bitmap |
bitmap to be drawn |
| groupIds |
which stroke groups to draw |
| viewPorts |
view ports to stroke groups |
| serializeDAO |
how to load strokes |
public static
boolean drawUtil (Bitmap bitmap, int groupId, int strokeId, ViewPort
viewPort, AbsSerializeDAO
serializeDAO)
static methods to draw strokes on bitmap.
Parameters
| bitmap |
bitmap to be drawn |
| groupId |
which stroke to draw |
| viewPort |
view port to stroke group |
| serializeDAO |
how to load strokes |
public static
boolean drawUtil (Bitmap bitmap, int groupId, ViewPort
viewPort, AbsSerializeDAO
serializeDAO)
static methods to draw strokes on bitmap.
Parameters
| bitmap |
bitmap to be drawn |
| groupId |
which stroke group to draw |
| viewPort |
view port to stroke group |
| serializeDAO |
how to load strokes |
public static
Paint getClearPaint ()
public static
float[] getInvertedPoint (float[] originalPoint, Matrix matrix)
This function takes an point (ex. {x, y}) and computes the inverted
coordinate with respect to the input matrix;
public static
byte[] intToByteArray (int value)
public static void
intToByteArray (int value, byte[] dest)
public static
byte[] longToByteArray (long value)
public static void
longToByteArray (long value, byte[] dest)
public static void
shortToByteArray (short value, byte[] dest)
public static
byte[] shortToByteArray (short value)