# BitmapData draw() method frustration!

**URL:** <https://forum.kirupa.com/t/bitmapdata-draw-method-frustration/284381>\
**Category:** Uncategorized\
**Created:** [March 18, 2009, 5:36pm UTC](https://forum.kirupa.com/t/bitmapdata-draw-method-frustration/284381 "2009-03-18T17:36:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SquirtGun](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@SquirtGun](https://forum.kirupa.com/u/SquirtGun)\
**Post date:** [March 18, 2009, 5:36pm UTC](https://forum.kirupa.com/t/bitmapdata-draw-method-frustration/284381/1 "2009-03-18T17:36:11Z")

</div>

Ok so here’s kind of an odd one. I am using the draw() method of the BitmapData to encode a jpeg of part of the image. Now this should be easy enough given the object I want to draw to the bitmap is on the stage at design time so I know its location and dimetions exactly! Heres the code I have in place.

```auto

var myBitmapSource:BitmapData = new BitmapData ( street.width, street.height, false, 0x333333);
myBitmapSource.draw(street, null, null, null, new Rectangle( 96, 5, 571, 450 ), true );

```

Now this should be easy enough. I know for a FACT that no part of the street clip I am drawing out is in negative space, and it’s registration is (0,0). However, it cuts off A lot of the top of my image. y=5 in the above rectangle is where I need the top to be, but it cuts the top off of the image… even if I change it to 0, it has no effect.

This issue would make sense if part of the object was in negative space, or it was a loaded swf, but neither is the case.

Any ideas? Thanks all

~squirt
