public abstract class

ViewPort

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

Class Overview

This class defines the functions that HtcPaintingView will need to draw the Strokes. To use HtcPaintingView, the programmer must implement the AbsHtcPaintingViewPort and provide an implementation of ViewPort instance to each StrokeGroup. HtcPaintingView then uses the values provided by the PaintingViewPort to draw Strokes of that StrokeGroup.

Summary

Fields
protected Matrix mMatrix
Public Constructors
ViewPort()
Public Methods
Matrix getMatrix()
abstract float getOffsetX()
return the x-axis offset of the ViewPort’s origin with respect to the canvas’s origin Ex.
abstract float getOffsetY()
return the y-axis offset of the ViewPort’s origin with respect to the canvas’s origin Ex.
abstract RectF getRectF()
abstract float getRotateDeg()
Returns the x-axis scaling factor
abstract float getRotatePivotX()
Returns the x-coordinate of the scaling origin with respect to the drawing canvas (Ex.
abstract float getRotatePivotY()
Returns the y-coordinate of the scaling origin with respect to the drawing canvas (Ex.
abstract float getScaleX()
Returns the x-axis scaling factor
abstract float getScaleY()
Returns the y-axis scaling factor
abstract float getScalingPivotX()
Returns the x-coordinate of the scaling origin with respect to the drawing canvas (Ex.
abstract float getScalingPivotY()
Returns the y-coordinate of the scaling origin with respect to the drawing canvas (Ex.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

protected Matrix mMatrix

Since: API Level 2.0

Public Constructors

public ViewPort ()

Since: API Level 2.0

Public Methods

public Matrix getMatrix ()

Since: API Level 2.0

public abstract float getOffsetX ()

Since: API Level 2.0

return the x-axis offset of the ViewPort’s origin with respect to the canvas’s origin Ex. result = (viewPort x-coordinate on original document) - (scrolling offset in x-axis)

Returns
  • x-axis offset

public abstract float getOffsetY ()

Since: API Level 2.0

return the y-axis offset of the ViewPort’s origin with respect to the canvas’s origin Ex. result = (viewPort y-coordinate on original document) - (scrolling offset in y-axis)

Returns
  • y-axis offset

public abstract RectF getRectF ()

Since: API Level 2.0

Returns
  • bounding rectangle of this view port with respect to drawing canvas coordinates

public abstract float getRotateDeg ()

Since: API Level 2.0

Returns the x-axis scaling factor

Returns
  • scaling factor in x-axis

public abstract float getRotatePivotX ()

Since: API Level 2.0

Returns the x-coordinate of the scaling origin with respect to the drawing canvas (Ex. the screen).

Returns
  • x-coordinate of the scaling origin

public abstract float getRotatePivotY ()

Since: API Level 2.0

Returns the y-coordinate of the scaling origin with respect to the drawing canvas (Ex. the screen).

Returns
  • y-coordinate of the scaling origin

public abstract float getScaleX ()

Since: API Level 2.0

Returns the x-axis scaling factor

Returns
  • scaling factor in x-axis

public abstract float getScaleY ()

Since: API Level 2.0

Returns the y-axis scaling factor

Returns
  • scaling factor y in y-axis

public abstract float getScalingPivotX ()

Since: API Level 2.0

Returns the x-coordinate of the scaling origin with respect to the drawing canvas (Ex. the screen).

Returns
  • x-coordinate of the scaling origin

public abstract float getScalingPivotY ()

Since: API Level 2.0

Returns the y-coordinate of the scaling origin with respect to the drawing canvas (Ex. the screen).

Returns
  • y-coordinate of the scaling origin