# BitmapData.draw clipping rectangle problem

**URL:** <https://forum.kirupa.com/t/bitmapdata-draw-clipping-rectangle-problem/266682>\
**Category:** flash\
**Created:** [July 23, 2008, 1:01pm UTC](https://forum.kirupa.com/t/bitmapdata-draw-clipping-rectangle-problem/266682 "2008-07-23T13:01:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![geter712](https://avatars.discourse-cdn.com/v4/letter/g/9d8465/32.png) [@geter712](https://forum.kirupa.com/u/geter712)\
**Post date:** [July 23, 2008, 1:01pm UTC](https://forum.kirupa.com/t/bitmapdata-draw-clipping-rectangle-problem/266682/1 "2008-07-23T13:01:52Z")

</div>

Ok imagine there is movieclip named my\_clip inserted on stage, library movie clip instance with ‘subclip’ linkage and BitmapData “my\_bitmap\_data”

my\_clip.attachMovie(‘subclip’,‘subclip’,1)  
my\_clip.subclip.\_x-=my\_clip.subclip.\_width/2  
my\_clip.subclip.\_y-=my\_clip.subclip.\_height/2

my\_rect = new Rectangle(my\_clip.subclip.\_x,my\_clip.subclip.\_y, my\_clip.subclip.\_width, my\_clip.subclip.\_height)

my\_bitmap\_data.draw(my\_clip,new Matrix(),new ColorTransform(),‘normal’,my\_rect);

As you can see I wanna take pixel informations from my\_clip (containing subclip which is centered and its pivot point is in the middle) but when I try to insert bitmap data into another clip via attachBitmap it gives only one quarter of the subclip (down-right) which means draw method ignored all graphic under 0 coordinate value. How is this possible?
