2011-06-05 43 views
0

希望有人能幫助。 我有一個Flex(4.5 /對空)應用程序,已宣佈這樣的圖形:停止火花縮放的圖形孩子FlexBuilder4.5

<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> 

當我調整圖形編程,還擴展邊界(矩形)以及橢圓(upperLeftHandle)。我需要調整圖形對象的大小,但是Rect和Ellipse(以及圖形內的其他任何內容)保持相同的比例。

任何人有任何想法?

回答

0

你必須使用Eclipse這樣

<s:Ellipse id="upperLeftHandle" height="8" width="8" x="-2" y="-2" > 

希望能解決你的問題

+0

這絕對沒有任何意義。粘貼相同的標籤,相同的參數不是答案。如果你不明白這個問題 - 不要在你的帖子上浪費時間。 – JohnD 2011-06-07 18:12:41

0

是否有你需要使用圖形標籤的具體原因是什麼?使用組標記可以讓您獲得所需的定位和調整大小功能。只要你只是改變組的寬度和高度,你會很好,沒有縮放問題。

<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>