FileDocCategorySizeDatePackage
GraphicsProperties.javaAPI DocphoneME MR2 API (J2ME)9403Wed May 02 18:00:34 BST 2007com.sun.perseus.j2d

GraphicsProperties

public interface GraphicsProperties
This interface is used to access and set computed property values for graphical characteristics such as fill or stroke color.

Fields Summary
boolean
INITIAL_DISPLAY
Default value for the display property
boolean
INITIAL_VISIBILITY
Default value for the visibility property
RGB
INITIAL_COLOR
Default value for the current color
RGB
INITIAL_FILL
Default value for the fill paint
float
INITIAL_FILL_OPACITY
Default value for fill opacity
RGB
INITIAL_STROKE
Default value for the stroke paint
float
INITIAL_STROKE_OPACITY
Default value for stroke opacity
int
INITIAL_FILL_RULE
Default stroke-width value
float
INITIAL_STROKE_WIDTH
Default stroke width
int
INITIAL_STROKE_LINE_JOIN
Default line join
int
INITIAL_STROKE_LINE_CAP
Default line cap
float
INITIAL_STROKE_MITER_LIMIT
Default miter limit
float[]
INITIAL_STROKE_DASH_ARRAY
Default dash array
float
INITIAL_STROKE_DASH_OFFSET
Default dash offset
float
INITIAL_OPACITY
Default value for opacity
int
WIND_EVEN_ODD
The even-odd rule specifies that a point lies inside the path if a ray drawn in any direction from that point to infinity is crossed by path segments an odd number of times.
int
WIND_NON_ZERO
The non-zero rule specifies that a point lies inside the path if a ray drawn in any direction from that point to infinity is crossed by path segments a different number of times in the counter-clockwise direction than the clockwise direction.
int
JOIN_MITER
Joins path segments by extending their outside edges until they meet.
int
JOIN_ROUND
Joins path segments by rounding off the corner at a radius of half the line width.
int
JOIN_BEVEL
Joins path segments by connecting the outer corners of their wide outlines with a straight segment.
int
CAP_BUTT
Ends unclosed subpaths and dash segments with no added decoration.
int
CAP_ROUND
Ends unclosed subpaths and dash segments with a round decoration that has a radius equal to half of the width of the pen.
int
CAP_SQUARE
Ends unclosed subpaths and dash segments with a square projection that extends beyond the end of the segment to a distance equal to half of the line width.
Constructors Summary
Methods Summary
public RGBgetColor()

return
the current color property value.

public booleangetDisplay()

return
true if the display is on. false otherwise

public PaintServergetFill()

return
the paint used for fill operations

public floatgetFillOpacity()

return
the opacity used for fill operations, in the [0, 1] range.

public intgetFillRule()

return
the rule used to fill shapes. One of WIND_NON_ZERO or WIND_EVEN_ODD.
see
#WIND_EVEN_ODD
see
#WIND_NON_ZERO

public floatgetOpacity()

return
the opacity used for blending operations, in the [0, 1] range.

public PaintServergetStroke()

return
the paint used to fill the stroked path

public float[]getStrokeDashArray()

return
an array of float value describing alternance of solid and transparent sections on stroked paths, starting with dash, followed by a gap.
see
#getStrokeDashOffset

public floatgetStrokeDashOffset()

return
the offset in the dash array.

public intgetStrokeLineCap()

return
the style used to decorate the ends of unclosed path segments. One of CAP_BUTT, CAP_ROUND or CAP_SQUARE.

public intgetStrokeLineJoin()

return
the style used to decorate line segment intersections. Can be one of JOIN_BEVEL, JOIN_MITER, JOIN_ROUND

public floatgetStrokeMiterLimit()

return
the limit of miter joins. Line joins which exceed this value are trimmed. The miter is expressed as the ratio of the miter length (i.e, the distance between the inner and the outer elbows) to the stroke width.

public floatgetStrokeOpacity()

return
the opacity used for stroke operations, in the [0, 1] range.

public floatgetStrokeWidth()

return
the width to use for stroking. This is expressed in user space and is the width of the line measured on a perpendicular to the stroked path.

public booleangetVisibility()

return
true if the node is visible. false otherwise

public voidsetColor(RGB color)

param
color the new color property value

public voidsetDisplay(boolean display)

param
display the new display property value

public voidsetFill(PaintServer fill)

param
fill the new paint to use for fill operations

public voidsetFillOpacity(float fillOpacity)

param
fillOpacity the new opacity to use for fill operations. The value is clamped to the [0, 1] range.

public voidsetFillRule(int fillRule)

param
fillRule the new rull to fill shapes
see
#getFillRule

public voidsetOpacity(float opacity)

param
opacity the new opacity to use for blending operations. The value is clamped to the [0, 1] range.

public voidsetStroke(PaintServer stroke)

param
stroke the new paint to use to fill stroked path

public voidsetStrokeDashArray(float[] strokeDashArray)

param
strokeDashArray the new set of dashes and gaps to use for stroking operations.
see
#getStrokeDashArray

public voidsetStrokeDashOffset(float strokeDashOffset)

param
strokeDashOffset the offset, in user space, in the stroke's dash array. This is ignored if the dash array is null

public voidsetStrokeLineCap(int strokeLineCap)

param
strokeLineCap the new line cap decoration style

public voidsetStrokeLineJoin(int strokeLineJoin)

param
strokeLineJoin the new line join style
see
#getStrokeLineJoin

public voidsetStrokeMiterLimit(float strokeMiterLimit)

param
strokeMiterLimit the new value for the miter limit
see
#getStrokeMiterLimit

public voidsetStrokeOpacity(float strokeOpacity)

param
strokeOpacity the new opacity to use for stroke operations. The value is clamped to the [0, 1] range.

public voidsetStrokeWidth(float strokeWidth)

param
strokeWidth the new stroke width
see
#getStrokeWidth

public voidsetVisibility(boolean visibility)

param
visibility the new visibility property value