# localToContent vs contentToGlobal

**URL:** <https://forum.kirupa.com/t/localtocontent-vs-contenttoglobal/304155>\
**Category:** flash\
**Created:** [February 2, 2010, 2:24pm UTC](https://forum.kirupa.com/t/localtocontent-vs-contenttoglobal/304155 "2010-02-02T14:24:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![stephgravity](https://avatars.discourse-cdn.com/v4/letter/s/e9bcb4/32.png) [@stephgravity](https://forum.kirupa.com/u/stephgravity)\
**Post date:** [February 2, 2010, 2:24pm UTC](https://forum.kirupa.com/t/localtocontent-vs-contenttoglobal/304155/1 "2010-02-02T14:24:56Z")

</div>

Hi all,  
I have the following case:  
VERSION 1  
// var r:Rectangle = UIComponent(rectangle).getBounds(bigCanvas));  
// var p:Point = UIComponent(bigCanvas).localToContent(r.topLeft);

VERSION 2  
var p:Point = UIComponent(rectangle.parent).contentToGlobal(new Point(figure.x, figure.y));  
p = UIComponent(bigCanvas).globalToContent§;

just for info: bigCanvas is the canvas where the rectangle is draw.

Do you have any idea, why, though the 2 codes are equivalent, the result is not the same? (for VERSION 1 the border of the menu is drawn 2px and semi-transparent)  
)

Thanks,  
Stephanie
