Reputation: 11
Hope someone can help. I have a Flex (4.5/Air) app that has a graphic declared like this :
<s:Graphic id="viewRect" width="200" height="200">
<s:Rect id="border" width="200" height="200">
<s:stroke >
<s:SolidColorStroke weight="1" color="#606060" />
</s:stroke>
</s:Rect>
<s:Ellipse id="upperLeftHandle" height="8" width="8" left="-2" top="-2" >
<s:fill>
<s:SolidColor color="#FFFFFF"/>
</s:fill>
</s:Ellipse>
</s:Graphic>
When I resize the Graphic programatically, it also scales the border (Rect) as well as the Ellipse (upperLeftHandle). I need to resize the graphic object, but have the Rect and Ellipse (and anything else inside the Graphic) remain the same scale.
Anyone have any ideas?
Upvotes: 0
Views: 143
Reputation: 36
Is there a specific reason you need to use the graphics tag? Using the Group tag will allow you the positioning and re-sizing capabilities that you need. As long are you are only changing the width and height of the group you will be fine and not have the scaling issues.
<s:Group id="viewRect" width="200" height="200">
<s:Rect id="border" left="0" right="0" top="0" bottom="0">
<s:stroke >
<s:SolidColorStroke weight="1" color="#606060" />
</s:stroke>
</s:Rect>
<s:Ellipse id="upperLeftHandle" height="8" width="8" left="-2" top="-2" >
<s:fill>
<s:SolidColor color="#FFFFFF"/>
</s:fill>
</s:Ellipse>
</s:Group>
Upvotes: 0
Reputation: 1228
you have to use Eclipse like this
<s:Ellipse id="upperLeftHandle" height="8" width="8" x="-2" y="-2" >
hope it would solve your problem
Upvotes: 0