public class

HtcPaintingUtil

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

Class Overview

This class provides some drawing utilities.

Summary

Public Constructors
HtcPaintingUtil()
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

Public Constructors

public HtcPaintingUtil ()

Since: API Level 2.0

Public Methods

public static int byteArrayToInt (byte[] bytes)

Since: API Level 2.0

public static short byteArrayToShort (byte[] bytes)

Since: API Level 2.0

public static long byteArraytoLong (byte[] bytes)

Since: API Level 2.0

public static Paint convertToPaint (StrokeProperties dp)

Since: API Level 2.0

public static boolean drawUtil (Bitmap bitmap, int[] groupIds, ViewPort[] viewPorts, AbsSerializeDAO serializeDAO)

Since: API Level 2.0

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
Returns
  • true if success

public static boolean drawUtil (Bitmap bitmap, int groupId, int strokeId, ViewPort viewPort, AbsSerializeDAO serializeDAO)

Since: API Level 2.0

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
Returns
  • true if success

public static boolean drawUtil (Bitmap bitmap, int groupId, ViewPort viewPort, AbsSerializeDAO serializeDAO)

Since: API Level 2.0

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
Returns
  • true if success

public static Paint getClearPaint ()

Since: API Level 2.0

public static float[] getInvertedPoint (float[] originalPoint, Matrix matrix)

Since: API Level 2.0

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)

Since: API Level 2.0

public static void intToByteArray (int value, byte[] dest)

Since: API Level 2.0

public static byte[] longToByteArray (long value)

Since: API Level 2.0

public static void longToByteArray (long value, byte[] dest)

Since: API Level 2.0

public static void shortToByteArray (short value, byte[] dest)

Since: API Level 2.0

public static byte[] shortToByteArray (short value)

Since: API Level 2.0