flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcl...@apache.org
Subject [04/41] git commit: [flex-sdk] [refs/heads/develop] - Added 160 and 640 support to multi dpi bitmaps
Date Sun, 01 Sep 2013 23:40:06 GMT
Added 160 and 640 support to multi dpi bitmaps


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/651b2ed8
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/651b2ed8
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/651b2ed8

Branch: refs/heads/develop
Commit: 651b2ed8e99ca5e88ebfe5ff6333d201ee1e3089
Parents: 252e441
Author: Justin Mclean <jmclean@apache.org>
Authored: Sat Aug 10 04:03:00 2013 +1000
Committer: Justin Mclean <jmclean@apache.org>
Committed: Sat Aug 10 04:03:00 2013 +1000

----------------------------------------------------------------------
 .../src/spark/utils/MultiDPIBitmapSource.as     | 100 +++++++++++++++----
 1 file changed, 82 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/651b2ed8/frameworks/projects/spark/src/spark/utils/MultiDPIBitmapSource.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/spark/src/spark/utils/MultiDPIBitmapSource.as b/frameworks/projects/spark/src/spark/utils/MultiDPIBitmapSource.as
index 5a44dea..dc59010 100644
--- a/frameworks/projects/spark/src/spark/utils/MultiDPIBitmapSource.as
+++ b/frameworks/projects/spark/src/spark/utils/MultiDPIBitmapSource.as
@@ -35,6 +35,17 @@ public class MultiDPIBitmapSource
 {
     include "../core/Version.as";
 
+	/**
+	 *  The source to use if the <code>Application.runtimeDPI</code> 
+	 *  is <code>DPIClassification.DPI_120</code>.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion ApacheFlex 4.11
+	 */
+	public var source120dpi:Object;
+	
     /**
      *  The source to use if the <code>Application.runtimeDPI</code> 
      *  is <code>DPIClassification.DPI_160</code>.
@@ -77,7 +88,18 @@ public class MultiDPIBitmapSource
 	 *  @playerversion AIR 2.6
 	 *  @productversion ApacheFlex 4.10
 	 */
-	public var source480dpi:Object;
+	public var source640dpi:Object;
+	
+	/**
+	 *  The source to use if the <code>Application.runtimeDPI</code> 
+	 *  is <code>DPIClassification.DPI_640</code>.
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion ApacheFlex 4.11
+	 */
+	public var source640dpi:Object;
     
     /**
      *  Select one of the sourceXXXdpi properties based on the given DPI.  This
@@ -101,42 +123,84 @@ public class MultiDPIBitmapSource
         var source:Object = source160dpi;
         switch (desiredDPI)
         {
+			case DPIClassification.DPI_640:
+				source = source640dpi;
+				if (!source || source == "")
+					source = source480dpi;
+				if (!source || source == "")
+					source = source320dpi;
+				if (!source || source == "")
+					source = source240dpi;
+				if (!source || source == "")
+					source = source160dpi;
+				if (!source || source == "")
+					source = source120dpi;
+				break;
 			case DPIClassification.DPI_480:
 				source = source480dpi;
 				if (!source || source == "")
+					source = source640dpi;
+				if (!source || source == "")
 					source = source320dpi;
 				if (!source || source == "")
 					source = source240dpi;
 				if (!source || source == "")
 					source = source160dpi;
+				if (!source || source == "")
+					source = source120dpi;
 				break;
-            case DPIClassification.DPI_160:
-                source = source160dpi;
+            case DPIClassification.DPI_320:
+                source = source320dpi;
+				if (!source || source == "")
+					source = source480dpi;
+				if (!source || source == "")
+					source = source640dpi;
                 if (!source || source == "")
                     source = source240dpi;
+                if (!source || source == "")
+                    source = source160dpi;
+				if (!source || source == "")
+					source = source120dpi;
+                break;
+			case DPIClassification.DPI_240:
+				source = source240dpi;
 				if (!source || source == "")
 					source = source320dpi;
 				if (!source || source == "")
 					source = source480dpi;
-                break;
-            case DPIClassification.DPI_240:
-                source = source240dpi;
-                if (!source || source == "")
-                    source = source320dpi;
+				if (!source || source == "")
+					source = source640dpi;
+				if (!source || source == "")
+					source = source160dpi;
+				if (!source || source == "")
+					source = source120dpi;
+				break;
+			case DPIClassification.DPI_160:
+				source = source160dpi;
+				if (!source || source == "")
+					source = source240dpi;
+				if (!source || source == "")
+					source = source320dpi;
 				if (!source || source == "")
 					source = source480dpi;
-                if (!source || source == "")
-                    source = source160dpi;
-                break;
-            case DPIClassification.DPI_320:
-                source = source320dpi;
-                if (!source || source == "")
-                    source = source240dpi;
+				if (!source || source == "")
+					source = source640dpi;
+				if (!source || source == "")
+					source = source120dpi;
+				break;
+			case DPIClassification.DPI_120:
+				source = source120dpi;
+				if (!source || source == "")
+					source = source160dpi;
+				if (!source || source == "")
+					source = source240dpi;
+				if (!source || source == "")
+					source = source320dpi;
 				if (!source || source == "")
 					source = source480dpi;
-                if (!source || source == "")
-                    source = source160dpi;
-                break;
+				if (!source || source == "")
+					source = source640dpi;
+				break;
         }
         return source;
         


Mime
View raw message