[COLOR=#0066cc]http://livedocs.adobe.com/labs/textlayout/flash/display/GraphicsPathCommand.html#NO_OP[/COLOR]
[COLOR=#0066cc][/COLOR]
Is there a use of that?
A little story:
DRAWING_VECTOR[1] = new GraphicsPath(Vector.<int>([5, 5, 2, 5]), initPathData);
//DRAWING_VECTOR[1] = new GraphicsPath(Vector.<int>([2, 3, 2, 3, 2]), initPathData);
I have created a rounded square on one side and I want to get rid of curveTos in some situations and make it maximally optimized.
So I thought to have
Vector.<int>([5, 0, 5, 5])//3 lineTos instead of earlier 4.
But it doesn’t work and creates slightly different line than here (a note: each line gives the same effect)
Vector.<int>([5, 5, 0, 5]);
Vector.<int>([5, 5, 5]);
Vector.<int>([0,5, 5,0,0,0, 5,0,0,0,0]);
Here is whole code:
private static const DRAWING_VECTOR:Vector.<IGraphicsData> = new Vector.<IGraphicsData>(3, true);
DRAWING_VECTOR[0] = new GraphicsGradientFill(GradientType.LINEAR, [0xFFFFFF, 0xFFFFFF], [.1, .75], [0x0F, 0xF0], matrixButton, SpreadMethod.REFLECT, InterpolationMethod.RGB);
//DRAWING_VECTOR[1] = new GraphicsPath(Vector.<int>([5, 0, 5, 5]), initPathData);
DRAWING_VECTOR[1] = new GraphicsPath(Vector.<int>([2, 3, 2, 3, 2]), initPathData);
DRAWING_VECTOR[2] = new GraphicsEndFill();
private static function get initPathData():Vector.<Number> {
var data:Vector.<Number> = new Vector.<Number>(14, true);
data[0] = data[2] = data[13] = 0;
data[1] = data[11] = BaseWindow.BAR_HEIGHT * 4 / 9;
data[3] = data[5] = data[7] = data[9] = BaseWindow.BAR_HEIGHT * 2 / 3;
data[4] = -BaseWindow.BAR_HEIGHT * 2 / 9;
data[8] = data[10] = data[12] = -BaseWindow.BAR_HEIGHT * 1.5;
data[6] = data[8] - data[4];
return data;
}