Defines a stroke line and fill style for a line segment, a curve or a graphics primitive object.
| StrokeStyle | Defines a stroke line and fill style for a line segment, a curve or a graphics primitive object. |
| Public static constants | |
| maxGradientColors | Maximum number of gradient colors in a fill. |
| Public line properties | |
| width | Line width |
| color | Line color |
| alpha | Line alpha |
| pixelHinting | Line is drawn with pixel hinting |
| scaleMode | Line LineScaleMode enum |
| caps | Line CapsStyle enum |
| joints | Line JointStyle enum |
| miterLimit | Line miter cutoff limit |
| Public fill properties | |
| numFillColors | Number of fill colors (0 is transparent, 1 is solid else 2-6 are gradients) |
| solidFillColor | Solid fill color |
| solidFillAlpha | Solid fill alpha |
| fillType | Gradient fill GradientType enum |
| spread | Gradient fill SpreadMethod enum |
| interpolation | Gradient fill InterpolationMethod enum |
| focalPointRatio | Gradient fill focal point ratio |
| boxWidth | Gradient fill box width |
| boxHeight | Gradient fill box height |
| boxRotation | Gradient fill box rotation |
| boxTx | Gradient fill box X-axis offset |
| boxTy | Gradient fill box Y-axis offset |
| fillColorArray | Array of gradient fill color RGB values |
| fillAlphaArray | Array of gradient fill alphas |
| fillRatioArray | Array of gradient fill distribution ratios |
| Construction/ | |
| StrokeStyle | Creates a stroke style object holding line style and solid or gradient fill properties for a StrokeItem. |
| clone | Returns a deep-copy of the StrokeStyle instance. |
| dispose | Remove resources and references held by this object. |
| Comparison | |
| isStrokeEqual | Compares the line style properties of this StrokeStyle with another instance to see if they are equal. |
| isFillEqual | Compares the fill properties of this StrokeStyle with another instance to see if they are equal. |
| Style manipulation | |
| scale | Scale the width of the line according the requested scaling and the setting of the LineScaleMode property. |
| Reverse engineering | |
| setStyleParams | Sets the line style properties to the given parameters. |
| setFillParams | Sets the solid fill properties to the given parameters. |
| setEndFill | Sets the fill properties to transparent. |
| setGradientParams | Sets the linear or radial gradient fill properties to the given parameters. |
| setBoxParams | Sets the gradient box properties to the given parameters. |
public function StrokeStyle( strokeWidth: Number = 1.0, strokeColor: uint = 0x000000, transparency: Number = 1.0, usePixelHinting: Boolean = false, strokeScaleMode: String = "normal", capStyle: String = "round", jointStyle: String = "round", strokeMiterLimit: Number = 3, numColorsInFill: uint = 0, fillColor: uint = 0x000000, fillAlpha: Number = 1.0, gradientType: String = "linear", spreadMethod: String = "pad", interpolationMethod: String = "rgb", focalRatio: Number = 0, gradientBoxWidth: Number = 100, gradientBoxHeight: Number = 100, gradientBoxRotation: Number = 0, gradientBoxTx: Number = 0, gradientBoxTy: Number = 0, fillColors: Array = null, fillAlphas: Array = null, fillRatios: Array = null )
Creates a stroke style object holding line style and solid or gradient fill properties for a StrokeItem.
Initializes gradient fill arrays if they are not given.
| strokeWidth | line width |
| strokeColor | line color |
| transparency | line alpha |
| usePixelHinting | line is drawn with pixel hinting |
| strokeScaleMode | line LineScaleMode enum |
| capStyle | line CapsStyle enum |
| jointStyle | line JointStyle enum |
| strokeMiterLimit | line miter cutoff limit |
| numColorsInFill | number of fill colors (0 is transparent, 1 is solid else 2-6 are gradients) |
| fillColor | solid fill color |
| fillAlpha | solid fill alpha |
| gradientType | gradient fill GradientType enum |
| spreadMethod | gradient fill SpreadMethod enum |
| interpolationMethod | gradient fill InterpolationMethod enum |
| focalRatio | gradient fill focal point ratio |
| gradientBoxWidth | gradient fill box width |
| gradientBoxHeight | gradient fill box height |
| gradientBoxRotation | gradient fill box rotation |
| gradientBoxTx | gradient fill box X-axis offset |
| gradientBoxTy | gradient fill box Y-axis offset |
| fillColors | array of gradient fill color RGB values |
| fillAlphas | array of gradient fill alphas |
| fillRatios | array of gradient fill distribution ratios |
public function clone():StrokeStyle
Returns a deep-copy of the StrokeStyle instance.
public function isStrokeEqual( style: StrokeStyle ):Boolean
Compares the line style properties of this StrokeStyle with another instance to see if they are equal.
| style | a StrokeStyle object |
true if equal, false otherwise
public function isFillEqual( style: StrokeStyle ):Boolean
Compares the fill properties of this StrokeStyle with another instance to see if they are equal.
| style | a StrokeStyle object |
true if equal, false otherwise
public function setStyleParams( params: Array ):void
Sets the line style properties to the given parameters.
| params | array of parameters as obtained from MethodParser.parseParameters |
public function setFillParams( params: Array ):void
Sets the solid fill properties to the given parameters.
| params | array of parameters as obtained from MethodParser.parseParameters |
public function setGradientParams( params: Array ):void
Sets the linear or radial gradient fill properties to the given parameters.
| params | array of parameters as obtained from MethodParser.parseParameters |
public function setBoxParams( params: Array ):void
Sets the gradient box properties to the given parameters.
| params | array of parameters as obtained from MethodParser.parseParameters |
Maximum number of gradient colors in a fill.
public static const maxGradientColors: uint
Line width
public var width: Number
Line color
public var color: uint
Line alpha
public var alpha: Number
Line is drawn with pixel hinting
public var pixelHinting: Boolean
Line LineScaleMode enum
public var scaleMode: String
Line CapsStyle enum
public var caps: String
Line JointStyle enum
public var joints: String
Line miter cutoff limit
public var miterLimit: Number
Number of fill colors (0 is transparent, 1 is solid else 2-6 are gradients)
public var numFillColors: int
Solid fill color
public var solidFillColor: uint
Solid fill alpha
public var solidFillAlpha: Number
Gradient fill GradientType enum
public var fillType: String
Gradient fill SpreadMethod enum
public var spread: String
Gradient fill InterpolationMethod enum
public var interpolation: String
Gradient fill focal point ratio
public var focalPointRatio: Number
Gradient fill box width
public var boxWidth: Number
Gradient fill box height
public var boxHeight: Number
Gradient fill box rotation
public var boxRotation: Number
Gradient fill box X-axis offset
public var boxTx: Number
Gradient fill box Y-axis offset
public var boxTy: Number
Array of gradient fill color RGB values
public var fillColorArray: Array
Array of gradient fill alphas
public var fillAlphaArray: Array
Array of gradient fill distribution ratios
public var fillRatioArray: Array
Creates a stroke style object holding line style and solid or gradient fill properties for a StrokeItem.
public function StrokeStyle( strokeWidth: Number = 1.0, strokeColor: uint = 0x000000, transparency: Number = 1.0, usePixelHinting: Boolean = false, strokeScaleMode: String = "normal", capStyle: String = "round", jointStyle: String = "round", strokeMiterLimit: Number = 3, numColorsInFill: uint = 0, fillColor: uint = 0x000000, fillAlpha: Number = 1.0, gradientType: String = "linear", spreadMethod: String = "pad", interpolationMethod: String = "rgb", focalRatio: Number = 0, gradientBoxWidth: Number = 100, gradientBoxHeight: Number = 100, gradientBoxRotation: Number = 0, gradientBoxTx: Number = 0, gradientBoxTy: Number = 0, fillColors: Array = null, fillAlphas: Array = null, fillRatios: Array = null )
Returns a deep-copy of the StrokeStyle instance.
public function clone():StrokeStyle
Remove resources and references held by this object.
public function dispose():void
Compares the line style properties of this StrokeStyle with another instance to see if they are equal.
public function isStrokeEqual( style: StrokeStyle ):Boolean
Compares the fill properties of this StrokeStyle with another instance to see if they are equal.
public function isFillEqual( style: StrokeStyle ):Boolean
Scale the width of the line according the requested scaling and the setting of the LineScaleMode property.
public function scale( xScale: Number, yScale: Number ):void
Sets the line style properties to the given parameters.
public function setStyleParams( params: Array ):void
Sets the solid fill properties to the given parameters.
public function setFillParams( params: Array ):void
Sets the fill properties to transparent.
public function setEndFill():void
Sets the linear or radial gradient fill properties to the given parameters.
public function setGradientParams( params: Array ):void
Sets the gradient box properties to the given parameters.
public function setBoxParams( params: Array ):void
Scans action method call parameters, pushes found parameters on the given paramArray reference.
private function parseParameters( paramList: String, paramArray: Array ):void