为什么drawRoundRectComplex()在ActionScript记录?drawRoundRectComplex、ActionScript

2023-09-09 21:46:13 作者:半生黄粱梦

在学习的ActionScript 3的图形类的,我遇到了无证 drawRoundRectComplex()方法。它是 drawRoundRect(),但有8个参数,最后四是每个角的直径(X,Y,宽度,高度,左上,右上,下一个变种左,右下图)。

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);

这似乎是一个pretty的有效方法,所以我只是好奇,如果任何人知道为什么土坯选择任何理由不将其记录下来?

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?

推荐答案

我相信这是记录在 mx.utils.GraphicUtils 类。

链接。