flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lee Burrows <subscripti...@leeburrows.com>
Subject Re: extend RuntimeDPIProvider
Date Thu, 06 Feb 2014 22:15:16 GMT
Hi

The runtimeDPIProvider rounds the true DPI number up/down so it matches 
one of 120,160...640

However, if your device is 373 (and not a typo), i would expect the 
result to be 320, not 480 (as 320 is closest to the true value).

You could override the class to return the true value, but the Flex 
framework relies on these discrete dpi values for determining the 
skins/css styles to use, so you may get unexpected results by allowing 
any value to be returned.



On 06/02/2014 22:02, Frank Dahmen wrote:
> Hi,
>
> when extending mx.core.RuntimeDPIProvider and overriding
> public function get runtimeDPI():Number
>
> it seems that is has to return one of the DPIClassification constants,
> any other number than 120,160,240,320,480,640 is ignored
>
> is that true?
>
> the thing is that the htc one max is reporting 480
> but it is 373 (from the specs)
>
> isn't it possible to return exact that number in runtimeprovider?
>
> thanks
>


-- 
Lee Burrows
ActionScripter


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message