# drawRect() Paradox

**URL:** <https://forum.kirupa.com/t/drawrect-paradox/298760>\
**Category:** flash\
**Created:** [October 24, 2009, 6:09am UTC](https://forum.kirupa.com/t/drawrect-paradox/298760 "2009-10-24T06:09:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raabi](https://avatars.discourse-cdn.com/v4/letter/r/41988e/32.png) [@Raabi](https://forum.kirupa.com/u/Raabi)\
**Post date:** [October 24, 2009, 6:09am UTC](https://forum.kirupa.com/t/drawrect-paradox/298760/1 "2009-10-24T06:09:49Z")

</div>

Hello gurus!

While using addChild() method for populating children inside a rectangle Sprite; if I use:

```auto
mySquare.graphics.drawRect(250, 35, 175, 175);

```

instead of:

```auto
mySquare.graphics.drawRect(0, 0, 175, 175); 
mySquare.x = 250; 
mySquare.y = 35;

```

it makes a lot of difference. In first case, the following statements cause all the children fall outside the parent mySquare Sprite, whereas they fall inside the parent in the second case.

```auto
myCircle.graphics.beginFill(0xFFCC00); 
myCircle.graphics.drawCircle(50, 50, 50); 
square.addChild(myCircle);

```

I just want to understnad why is it like that. Any help, please!
