Adobe Air 移动矢量图形看起来很糟糕
我有一个非常简单的 AS3 应用程序,它使用绘图 api 绘制几个圆圈并显示嵌入的纯 SVG 文件(也是半径较小的圆圈)。图形在模拟器上看起来不错(当我在 FlashBuilder 中更改不同的皮肤时),但在实际设备上看起来很糟糕。我尝试了两台 HTC Thunderbolt 和 Asus ePad。我不缩放任何东西,即使我认为这对于位图来说是个问题,而不是基于矢量的图形。有谁知道是怎么回事吗?或者我错过了什么?
package
{
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
public class bootest extends Sprite
{
[Embed(source="circle.svg")]
private var BackUp:Class;
public function bootest()
{
super();
// support autoOrients
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
var front:Sprite = new Sprite();
front.graphics.beginFill(0x0000ff, 1);
front.graphics.drawCircle(0, 0, 70);
front.graphics.endFill();
front.graphics.beginFill(0xffff00, 1);
front.graphics.drawCircle(0, 0, 60);
front.graphics.endFill();
front.x = 150;
front.y = 150;
addChild(front);
var svg:Sprite = new BackUp();
svg.x = front.x;
svg.y = front.y + front.height + 25;
addChild(svg);
}
}
}
左侧模拟器与右侧设备屏幕截图
I have a very simple AS3 app that draws few circles using drawing api and displays an embedded plain SVG file (which is also circle of a smaller radius). The graphics looks good on the emulator (when I change different skins in the FlashBuilder) but looks pretty bad on the actual devices. I tried two HTC Thunderbolt and Asus ePad. I don't scale anything, even if I would I think that will be problem for bitmap but not vector based graphics. Anyone knows if that how it is? Or am I missing something?
package
{
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
public class bootest extends Sprite
{
[Embed(source="circle.svg")]
private var BackUp:Class;
public function bootest()
{
super();
// support autoOrients
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
var front:Sprite = new Sprite();
front.graphics.beginFill(0x0000ff, 1);
front.graphics.drawCircle(0, 0, 70);
front.graphics.endFill();
front.graphics.beginFill(0xffff00, 1);
front.graphics.drawCircle(0, 0, 60);
front.graphics.endFill();
front.x = 150;
front.y = 150;
addChild(front);
var svg:Sprite = new BackUp();
svg.x = front.x;
svg.y = front.y + front.height + 25;
addChild(svg);
}
}
}
Left side emulator Vs Right side screenshot from the device
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一个大概的猜测,但可能值得一试。 AIR 移动舞台质量默认为中,尝试使用高或最佳。
关于移动和矢量的快速警告,它们可以使移动应用程序运行速度非常快,如果可能的话最好使用位图。
This is a ballpark guess, but it might be worth a try. AIR mobile stage quality defaults to medium, try using high, or best.
Quick warning about mobile and vectors, they can make mobile apps run slow pretty quick, when possible its best to use bitmaps instead.