3

In studying actionscript 3's graphics class, I've come across the undocumented drawRoundRectComplex() method. It's a variant of drawRoundRect() but with 8 parameters, the final four being the diameter of each corner (x, y, width, height, top left, top right, bottom left, bottom right).

//example
var sp:Sprite = new Sprite();
sp.graphics.lineStyle(1, 0x000000);
sp.graphics.drawRoundRectComplex(0, 0, 200, 150, 110, 50, 0, 10);
addChild(sp);

this seems to be a pretty useful method, so i'm just curious if anyone knows of any reasons why adobe chose not to document it?

Sathyajith Bhat
  • 21,321
  • 22
  • 95
  • 134
Chunky Chunk
  • 16,553
  • 15
  • 84
  • 162

1 Answers1

2

I believe it's documented in the mx.utils.GraphicUtils class.

Link.

Rev316
  • 1,920
  • 2
  • 19
  • 24
  • there it is. strange that it doesn't show up in blue in frame or actionscripts for flash cs4. i guess it's under-documented rather than undocumented. – Chunky Chunk Mar 19 '10 at 01:20
  • is mx.utils.GraphicUtils a legacy class? if so would that make drawRoundRectComplex old also? is there something newer? – Chunky Chunk Mar 19 '10 at 02:05
  • Formally I think everything in the mx.* package is Flex, or at least used to be. Offhand I suspect that the undocumented part is that Graphics implements what used to be a flex-only routine? – fenomas Mar 19 '10 at 16:34