TinyLine
v2.0

com.tinyline.tiny2d
Class TinyState

java.lang.Object
  extended bycom.tinyline.tiny2d.TinyState

public class TinyState
extends java.lang.Object

Graphics State

A TinyState object encapsulates state information needed for the basic rendering operations. The TinyState state information includes:

Attribute Inital Value Description
bg 0xffffffff The background ARBG color.
antialias true If it is true, Tiny2D draws with antialiasing.
devMat the identity matrix The transformation matrix which defines the mapping from user space to device space.
devBounds an empty rectangle The shape bounds in device space.
fillRule FILL_STYLE_EO The fill rule indicates the algorithm which is to be used to determine what parts of the canvas are included inside the shape. There are two types of winding rules: FILL_STYLE_EO and FILL_SYLE_WIND
fillColor TinyColor(0xff000000) The fill color paints the interior of the given shape.
strokeColor TinyColor.NONE The stroke color paints along the outline of the given shape.
dashArray null The stroke dash array controls the pattern of dashes and gaps used to stroke paths.
dashPhase 0 The stroke dash phase specifies the distance into the dash pattern to start the dash.
strokeWidth 1<<FIX_BITS The width of the stroke.
capStyle CAP_BUTT The stroke cap style specifies the shape to be used at the end of open subpaths when they are stroked. There are three stoke cap styles: CAP_BUTT, CAP_ROUND and CAP_SQUARE.
joinStyle JOIN_MITER The stroke join style specifies the shape to be used at the corners of paths or basic shapes when they are stroked. There are three line join styles: JOIN_BEVEL, JOIN_MITER and JOIN_ROUND.
miterLimit 4<<FIX_BITS The stroke miter limit imposes a limit on the ratio of the miter length to the stroke width.
globalAlpha 255 The global alpha specifies the opacity of all painting operations.
fillAlpha 255 The fill alpha specifies the opacity of the painting operation used to paint the interior the shape.
strokeAlpha 255 The stroke alpha specifies the opacity of the painting operation used to stroke the shape.
textDir TEXT_DIR_LR The current text direction.

Version:
2.0
Author:
Andrew Girow

Field Summary
 boolean antialias
          If true this Tiny2D is antialiased.
 int bg
          The background ARBG color.
 int capStyle
          The current stroke cap style specifies the shape to be used at the end of open subpaths when they are stroked.
 int[] dashArray
          The current dash array controls the pattern of dashes and gaps used to stroke paths.
 int dashPhase
          The current stroke dash phase specifies the distance into the dash pattern to start the dash.
 TinyRect devBounds
          The current shape device bounds.
 TinyRect devClip
          The current device clip.
 TinyMatrix devMat
          The current transformation matrix from user space to device space.
 int fillAlpha
          The current fill alpha specifies the opacity of the painting operation used to fill the current shape.
 TinyColor fillColor
          The current fill color paints the interior of the given shape.
 int fillRule
          The current fillRule indicates the algorithm which is to be used to determine what parts of the canvas are included inside the shape.
 int globalAlpha
          The current global alpha specifies the opacity of the all painting operations.
 int joinStyle
          The current stroke join style specifies the shape to be used at the corners of paths or basic shapes when they are stroked.
 int miterLimit
          The current stroke miter limit imposes a limit on the ratio of the miter length to the stroke width.
 int strokeAlpha
          The current stroke alpha specifies the opacity of the painting operation used to stroke the current shape.
 TinyColor strokeColor
          The current stroke color paints along the outline of the given shape.
 int strokeWidth
          The current stroke width specifies the width of the stroke.
 int textDir
          The current text direction.
 
Constructor Summary
TinyState()
          Constructs a new TinyState representing the Initial graphics state
 
Method Summary
 void init()
          Sets this TinyState object to the Initial graphics state
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bg

public int bg
The background ARBG color.


antialias

public boolean antialias
If true this Tiny2D is antialiased.


devMat

public TinyMatrix devMat
The current transformation matrix from user space to device space.


devClip

public TinyRect devClip
The current device clip.


devBounds

public TinyRect devBounds
The current shape device bounds.


fillRule

public int fillRule
The current fillRule indicates the algorithm which is to be used to determine what parts of the canvas are included inside the shape. The value must be one of the following: FILL_STYLE_WIND or FILL_STYLE_EO.


fillColor

public TinyColor fillColor
The current fill color paints the interior of the given shape. The value must be one of the following: TinyColor or TinyColor.NONE


strokeColor

public TinyColor strokeColor
The current stroke color paints along the outline of the given shape. The value must be one of the following: TinyColor or TinyColor.NONE


strokeWidth

public int strokeWidth
The current stroke width specifies the width of the stroke.


capStyle

public int capStyle
The current stroke cap style specifies the shape to be used at the end of open subpaths when they are stroked. The value must be one of the following: CAP_BUTT, CAP_ROUND or CAP_SQUARE.


joinStyle

public int joinStyle
The current stroke join style specifies the shape to be used at the corners of paths or basic shapes when they are stroked. The value must be one of the following: JOIN_MITER, JOIN_ROUND or JOIN_BEVEL.


miterLimit

public int miterLimit
The current stroke miter limit imposes a limit on the ratio of the miter length to the stroke width.


dashArray

public int[] dashArray
The current dash array controls the pattern of dashes and gaps used to stroke paths.


dashPhase

public int dashPhase
The current stroke dash phase specifies the distance into the dash pattern to start the dash.


globalAlpha

public int globalAlpha
The current global alpha specifies the opacity of the all painting operations. The value must be in the range [0-255].


strokeAlpha

public int strokeAlpha
The current stroke alpha specifies the opacity of the painting operation used to stroke the current shape. The value must be in the range [0-255].


fillAlpha

public int fillAlpha
The current fill alpha specifies the opacity of the painting operation used to fill the current shape. The value must be in the range [0-255].


textDir

public int textDir
The current text direction. The value must be one of the following: TEXT_DIR_LR, TEXT_DIR_RL or TEXT_DIR_TB.

Constructor Detail

TinyState

public TinyState()
Constructs a new TinyState representing the Initial graphics state

Method Detail

init

public void init()
Sets this TinyState object to the Initial graphics state


TinyLine
v2.0

Provided under the terms of the TinyLine License Agreement that has been included with this distribution