cayennecode
September 18th, 2007, 03:35 PM
Why oh why doesn't the BitmapData's draw (clipRect) parameter adjust the clipped rectangle's x,y to 0,0? Is there syntax for this that I'm missing? It seems logical that if I am going to selectively clip the drawn region with a rectangle, parameter, that I'd ONLY want that area drawn...
Though I also see how it could be useful to keep the original coordinates, but shouldn't that be an optional parameter tacked onto the draw method?
var rect:Rectangle = new Rectangle(100, 100, W, H);
var bitmapData:BitmapData = new BitmapData(W, H, false, 0xFFFFFF);
bitmapData.draw(DisplayObject, null, null, null, rect );
to compensate for this, I suppose you just have to do
var rect:Rectangle = new Rectangle(100, 100, W, H);
var bitmapData:BitmapData = new BitmapData(W+ 100, H+ 100, false, 0xFFFFFF);
bitmapData.draw(DisplayObject, null, null, null, rect );
and then in some other way adjust for that additional 100pixels when adding to the display list....
any have any better idea? I'm hoping I'm just not seeing something here.
Though I also see how it could be useful to keep the original coordinates, but shouldn't that be an optional parameter tacked onto the draw method?
var rect:Rectangle = new Rectangle(100, 100, W, H);
var bitmapData:BitmapData = new BitmapData(W, H, false, 0xFFFFFF);
bitmapData.draw(DisplayObject, null, null, null, rect );
to compensate for this, I suppose you just have to do
var rect:Rectangle = new Rectangle(100, 100, W, H);
var bitmapData:BitmapData = new BitmapData(W+ 100, H+ 100, false, 0xFFFFFF);
bitmapData.draw(DisplayObject, null, null, null, rect );
and then in some other way adjust for that additional 100pixels when adding to the display list....
any have any better idea? I'm hoping I'm just not seeing something here.