flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maurice Amsellem <maurice.amsel...@systar.com>
Subject MultiBitmapSource
Date Tue, 17 Sep 2013 18:25:42 GMT
Hi Community,

MultiBitmapSource getSource(dpi) method is called 3 times in the SDK with exactly the same
code:

     var app:Object = FlexGlobals.topLevelApplication;
                var dpi:Number;
                if ("runtimeDPI" in app)
                    dpi = app["runtimeDPI"];
                else
                    dpi = DensityUtil.getRuntimeDPI();
                var multiSource:Object = MultiDPIBitmapSource(source).getSource(dpi);


Wouldn't it be better to have this code embedded in the MultiBitmapSource getSource() method
?

The desiredDPI:Number arg could be made optional, so as not to break existing code, and use
the above code when desiredDPI is NaN .

Another advantage of this is that it will allow to use MBS with other classes, such as BitmapAssets.

What do you think?

Regards,

Maurice




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