Updates a stroke shape or path object with properties obtained by a method parser.
StrokeObjectGenerator | Updates a stroke shape or path object with properties obtained by a method parser. |
Public properties | |
stroke | Stroke object that is updated by a call to updateFromParser. |
Public methods | |
updateFromParser | Updates the stroke object with properties collected by a MethodParser. |
Private methods | |
setupCoordinateSystem | Sets the stroke coordinate system for according to defined coordinate system values present in the parser. |
setupStrokeProperties | Sets stroke properties for transparency, rotation, scale and position according to the values present in the parser. |
setupStrokeActions | 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. |
nextActionSegmentIndex | Finds the index in the actions array of the next line segment action. |
nextActionObjectIndex | Finds the index in the actions array of the next graphical object (circle, ellipse, rect or rounded rect). |
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. This may be a partial update depending on the parser properties. Only shapes and paths are handled, not timelines or dependencies.
parser | initialized method parser object |
An empty string if successful or a string with an error message
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.
actions | array of stroke actions obtained from parsing |
An empty string if successful or a string with an error message
private function nextActionSegmentIndex( actions: Array, fromIndex: int ):int
Finds the index in the actions array of the next line segment action.
actions | array of stroke actions obtained from parsing |
fromIndex | start position for the search |
Index position of the action or -1 if no further line segment actions exists
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).
actions | array of stroke actions obtained from parsing |
fromIndex | start position for the search |
Index position of the action or -1 if no further object actions exists
Stroke object that is updated by a call to updateFromParser.
public var stroke: Stroke
Updates the stroke object with properties collected by a MethodParser.
public function updateFromParser( parser: MethodParser ):String
Sets the stroke coordinate system for according to defined coordinate system values present in the parser.
private function setupCoordinateSystem( parser: MethodParser ):void
Sets stroke properties for transparency, rotation, scale and position according to the values present in the parser.
private function setupStrokeProperties( parser: MethodParser ):void
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 setupStrokeActions( actions: Array ):String
Finds the index in the actions array of the next line segment action.
private function nextActionSegmentIndex( actions: Array, fromIndex: int ):int
Finds the index in the actions array of the next graphical object (circle, ellipse, rect or rounded rect).
private function nextActionObjectIndex( actions: Array, fromIndex: int ):int