如何在 Actionsctipt 3 中更改形状边框描边运行时间

发布于 2024-09-24 21:12:15 字数 137 浏览 0 评论 0原文

我的 MovieClip 中有一个复杂的形状。
运行时我想根据尺寸比例更改此形状的笔划宽度。

如何在不使用绘图 API 重新绘制整个 Shape 的情况下更改此属性(几乎不可能,是具有非常详细边框的地图)?

是否可以 ?

I've got a complicated shape in a MovieClip.
Runtime i want to change the stroke width of this Shape depending on a size ratio.

How can I change this property without redrawing the entire Shape with the drawing API (almost impossible, is a map with very detailed borders) ?

Is it possible ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

江城子 2024-10-01 21:12:15

这很棘手,但有可能。

您可以使用 as3swf 来解析形状、更改 lineStyle 记录、发布它并将其读回到您的主 SWF 中。 as3swf 需要 Flash Player 10 才能工作。

as3swf:http://github.com/claus/as3swf

示例:http://github.com/claus/as3swf/tree/master/examples/flexmania/ (参见4 - PublishModifiedLogo.fla

不过,您可能需要重新考虑重新绘制修改后的形状。 as3swf 具有将形状导出到 GraphicsData 的功能,并且 Graphics.drawGraphicsData() 速度非常快。

It's tricky, but possible.

You can use as3swf to parse the shape, change the lineStyle record, publish it and read it back in to your master SWF. Flash Player 10 would be required for as3swf to work.

as3swf: http://github.com/claus/as3swf

Example: http://github.com/claus/as3swf/tree/master/examples/flexmania/ (see 4 - PublishModifiedLogo.fla)

You may want to reconsider redrawing the modified shape though. as3swf features export of shapes to GraphicsData, and Graphics.drawGraphicsData() is very fast.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文