StrokeObjectGenerator

Updates a stroke shape or path object with properties obtained by a method parser.

Summary
StrokeObjectGeneratorUpdates a stroke shape or path object with properties obtained by a method parser.
Public properties
strokeStroke object that is updated by a call to updateFromParser.
Public methods
updateFromParserUpdates the stroke object with properties collected by a MethodParser.
Private methods
setupCoordinateSystemSets the stroke coordinate system for according to defined coordinate system values present in the parser.
setupStrokePropertiesSets stroke properties for transparency, rotation, scale and position according to the values present in the parser.
setupStrokeActionsSets stroke shape point and object item positions, line and fill styles, gradient boxes and shape filters according to the actions present in the parsed action array.
nextActionSegmentIndexFinds the index in the actions array of the next line segment action.
nextActionObjectIndexFinds the index in the actions array of the next graphical object (circle, ellipse, rect or rounded rect).

Public properties

stroke

public var stroke: Stroke

Stroke object that is updated by a call to updateFromParser.

Public methods

updateFromParser

public function updateFromParser(parser: MethodParser):String

Updates the stroke object with properties collected by a MethodParser.  This may be a partial update depending on the parser properties.  Only shapes and paths are handled, not timelines or dependencies.

Parameters

parserinitialized method parser object

Returns

An empty string if successful or a string with an error message

Private methods

setupCoordinateSystem

private function setupCoordinateSystem(parser: MethodParser):void

Sets the stroke coordinate system for according to defined coordinate system values present in the parser.

Parameters

parserinitialized method parser object

setupStrokeProperties

private function setupStrokeProperties(parser: MethodParser):void

Sets stroke properties for transparency, rotation, scale and position according to the values present in the parser.

Parameters

parserinitialized method parser object

setupStrokeActions

private function setupStrokeActions(actions: Array):String

Sets stroke shape point and object item positions, line and fill styles, gradient boxes and shape filters according to the actions present in the parsed action array.

Parameters

actionsarray of stroke actions obtained from parsing

Returns

An empty string if successful or a string with an error message

nextActionSegmentIndex

private function nextActionSegmentIndex(actions: Array,
fromIndex: int):int

Finds the index in the actions array of the next line segment action.

Parameters

actionsarray of stroke actions obtained from parsing
fromIndexstart position for the search

Returns

Index position of the action or -1 if no further line segment actions exists

nextActionObjectIndex

private function nextActionObjectIndex(actions: Array,
fromIndex: int):int

Finds the index in the actions array of the next graphical object (circle, ellipse, rect or rounded rect).

Parameters

actionsarray of stroke actions obtained from parsing
fromIndexstart position for the search

Returns

Index position of the action or -1 if no further object actions exists

public var stroke: Stroke
Stroke object that is updated by a call to updateFromParser.
public function updateFromParser(parser: MethodParser):String
Updates the stroke object with properties collected by a MethodParser.
Reverse engineering parser for generated AS3 script methods
private function setupCoordinateSystem(parser: MethodParser):void
Sets the stroke coordinate system for according to defined coordinate system values present in the parser.
private function setupStrokeProperties(parser: MethodParser):void
Sets stroke properties for transparency, rotation, scale and position according to the values present in the parser.
private function setupStrokeActions(actions: Array):String
Sets stroke shape point and object item positions, line and fill styles, gradient boxes and shape filters according to the actions present in the parsed action array.
private function nextActionSegmentIndex(actions: Array,
fromIndex: int):int
Finds the index in the actions array of the next line segment action.
private function nextActionObjectIndex(actions: Array,
fromIndex: int):int
Finds the index in the actions array of the next graphical object (circle, ellipse, rect or rounded rect).
Close