Very fine Finnish tar shampoo
A bottle of the fine Finnish tar shampoo

Differences in drawRoundRect and drawRoundRectComplex

It seems that drawRoundRectComplex is not even documented by Adobe in their AS3 language reference, but referred elsewhere in their documentation.

drawRoundRect can be found.

Anyhow, the code shown here will demonstrate the differences with the two rounded corner rectangle drawing functions which are available in the flash.display.Graphics class. The white whale looking box is using the “complex” version.

The main differences are the way these two functions are handling the last parameters, latter one is calling them as radius, where as the simpler one as with and height.

Source code example RoundedCornersTest.as now available at GitHub.

More complex shapes are now possible with a one function, if you manage to calculate different values for each corner.