# GraphicsPath NO\_OP

**URL:** https://forum.kirupa.com/t/graphicspath-no-op/277429
**Category:** flash
**Created:** [December 11, 2008, 10:17pm UTC](https://forum.kirupa.com/t/graphicspath-no-op/277429 "2008-12-11T22:17:25Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Felixz](https://avatars.discourse-cdn.com/v4/letter/f/ecb155/32.png) [@Felixz](https://forum.kirupa.com/u/Felixz)
#### Post date: [December 11, 2008, 10:17pm UTC](https://forum.kirupa.com/t/graphicspath-no-op/277429/1 "2008-12-11T22:17:25Z")

</div>

[[COLOR=#0066cc]http://livedocs.adobe.com/labs/textlayout/flash/display/GraphicsPathCommand.html#NO\_OP[/COLOR]](http://livedocs.adobe.com/labs/textlayout/flash/display/GraphicsPathCommand.html#NO_OP)  
[COLOR=#0066cc][/COLOR]  
Is there a use of that?  
A little story:

```auto
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

```auto
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)

```auto
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:

```auto
  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;
  }

```
