views:

26

answers:

1

Hi,

We are building an application in Flex where we have to scale and reposition the circles based on the changed screen resolutions.

Example:

Current resolution: (800, 600) I draw a circle at position (410,290) with radius 10

Now If i change the resolution of screen to (1440, 960) then the circle should be drawn at the same place on the screen with respect to the new resolution with relative increase in the radius.

Can somebody help please ?

A: 

You could just scale the whole application to match the new resolution by using scaleX and scaleY of some high-level container. You just define your layout on some specific resolution and then calculate the scaleX and scaleY by 1440/800 and 960/600, respectively. The aspect ratios of your resolutions are different, hence the circle will become an ellipse if linearly scaled.

tehmou