如何在 AS3 中绘制带轮廓且不填充的形状?
How to draw shapes with outline and fill with nothing in AS3?
将 graphics.lineStyle
与 graphics.drawRect
或 graphics.drawCircle
结合使用。
// this means you want to draw a line on the outer edge
// 1 is thickness, and you got more options like color, etc.
graphics.lineStyle(1);
// draw rect
graphics.drawRect(x, y, width, height);
// draw circle
graphics.drawCircle(x, y, radius);
感谢@BotMaster 指出您不需要 begin/end 填充。
将 graphics.lineStyle
与 graphics.drawRect
或 graphics.drawCircle
结合使用。
// this means you want to draw a line on the outer edge
// 1 is thickness, and you got more options like color, etc.
graphics.lineStyle(1);
// draw rect
graphics.drawRect(x, y, width, height);
// draw circle
graphics.drawCircle(x, y, radius);
感谢@BotMaster 指出您不需要 begin/end 填充。