关于位图重复x和y的快速问题,我尝试了以下内容并且它不起作用
mySprite.graphics.beginBitmapFill(myFill);
mySprite.graphics.drawRect(-5, -5, 10, 10);
mySprite.graphics.endFill();
是因为你需要一个矩阵
public function beginBitmapFill(bitmap:BitmapData, matrix:Matrix = null, repeat:Boolean = true, smooth:Boolean = false):void
干杯 比尔
答案 0 :(得分:2)
function drawBackground():void {
var clip:MovieClip = new GradientMovieClip();
var bd:BitmapData = new BitmapData(clip.width, clip.height, true, 0xFFFFFF); // set the color to 0xFFFFFF if you use transparent png file for the pattern
bd.draw(clip);
_background.graphics.clear();
_background.graphics.beginBitmapFill(bd);
_background.graphics.drawRect(0, 0, widthOfTheScreen, heightOfTheScreen);
_background.graphics.endFill();
}
问题解决了