Use ImageMask instead of Depth1Image for masks
authorStefan Vogel <sv@exept.de>
Fri, 23 May 2014 11:28:30 +0200
changeset 3117 ee3f64a07e16
parent 3116 21e748176901
child 3118 d0e78fb8d796
Use ImageMask instead of Depth1Image for masks
ResourceSelectionBrowser.st
--- a/ResourceSelectionBrowser.st	Fri May 23 11:27:38 2014 +0200
+++ b/ResourceSelectionBrowser.st	Fri May 23 11:28:30 2014 +0200
@@ -184,59 +184,95 @@
 !ResourceSelectionBrowser class methodsFor:'image specs'!
 
 iconCategory
+    <resource: #image>
     "This resource specification was automatically generated
      by the ImageEditor of ST/X."
-
     "Do not manually edit this!! If it is corrupted,
      the ImageEditor may not be able to read the specification."
-
     "
      self iconCategory inspect
-     ImageEditor openOnClass:self andSelector:#iconCategory
-    "
-
-    <resource: #image>
-
-    ^Icon
-        constantNamed:#'ResourceSelectionBrowser class iconCategory'
-        ifAbsentPut:[(Depth4Image new) width: 18; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'3L0@@@@@@L3L3L@@@@@@@@3L3@@3L3L3L0CL3@LQDQDQD#CL3@LRH"H"H3CL3@LRH"H"H3CL3@LRH"H"H3CL3@LRH"H"H3CL3@LRH"H"H3CL3@LRH"H"H3CL3@LRH"H"H3CL3@LRH"H"H3CL3@L#L3L3L3CL3@@3L3L3L0CL3L@@@@@@@@3L3L0@@@@@@L3L') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 127 127 127 255 0 0 0 255 0 0 0 255 0 255 255 255 255 0 255 0 255 127 0 0 0 127 0 0 0 127 0 127 127 127 127 0 127 0 127]; mask:((Depth1Image new) width: 18; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'<@O@8@G@3?3@7?;@7?;@7?;@7?;@7?;@7?;@7?;@7?;@7?;@7?;@3?3@8@G@<@O@') ; yourself); yourself]
+     ImageEditor openOnClass:self andSelector:#iconCategory"
+    
+    ^ Icon constantNamed:#'ResourceSelectionBrowser class iconCategory'
+        ifAbsentPut:[
+            (Depth4Image new)
+                width:18;
+                height:16;
+                photometric:(#palette);
+                bitsPerSample:(#( 4 ));
+                samplesPerPixel:(1);
+                bits:(ByteArray 
+                            fromPackedString:'3L0@@@@@@L3L3L@@@@@@@@3L3@@3L3L3L0CL3@LQDQDQD#CL3@LRH"H"H3CL3@LRH"H"H3CL3@LRH"H"H3CL3@LRH"H"H3CL3@LRH"H"H3CL3@LRH"H"H3CL3@LRH"H"H3CL3@LRH"H"H3CL3@L#L3L3L3CL3@@3L3L3L0CL3L@@@@@@@@3L3L0@@@@@@L3L');
+                colorMapFromArray:#[ 0 0 0 255 255 255 170 170 170 127 127 127 255 0 0 0 255 0 0 0 255 0 255 255 255 255 0 255 0 255 127 0 0 0 127 0 0 0 127 0 127 127 127 127 0 127 0 127 ];
+                mask:((ImageMask new)
+                            width:18;
+                            height:16;
+                            bits:(ByteArray 
+                                        fromPackedString:'<@O@8@G@3?3@7?;@7?;@7?;@7?;@7?;@7?;@7?;@7?;@7?;@7?;@3?3@8@G@<@O@');
+                            yourself);
+                yourself
+        ]
 !
 
 iconClass
+    <resource: #image>
     "This resource specification was automatically generated
      by the ImageEditor of ST/X."
-
     "Do not manually edit this!! If it is corrupted,
      the ImageEditor may not be able to read the specification."
-
     "
      self iconClass inspect
-     ImageEditor openOnClass:self andSelector:#iconClass
-    "
-
-    <resource: #image>
-
-    ^Icon
-        constantNamed:#'ResourceSelectionBrowser class iconClass'
-        ifAbsentPut:[(Depth2Image new) width: 18; height: 16; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@*****ABUUUUT@IUUUUP@%UUUU@BUUUUT@IUUUUP@%UUUU@BUUUUT@IUUUUP@%UUUU@BUUUUT@IUUUUP@%UUUU@A@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 170 170 170 255 255 255]; mask:((Depth1Image new) width: 18; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'_?>@???@???@???@???@???@???@???@???@???@???@???@???@???@???@_?>@') ; yourself); yourself]
+     ImageEditor openOnClass:self andSelector:#iconClass"
+    
+    ^ Icon constantNamed:#'ResourceSelectionBrowser class iconClass'
+        ifAbsentPut:[
+            (Depth2Image new)
+                width:18;
+                height:16;
+                photometric:(#palette);
+                bitsPerSample:(#( 2 ));
+                samplesPerPixel:(1);
+                bits:(ByteArray 
+                            fromPackedString:'@@@@@@@*****ABUUUUT@IUUUUP@%UUUU@BUUUUT@IUUUUP@%UUUU@BUUUUT@IUUUUP@%UUUU@BUUUUT@IUUUUP@%UUUU@A@@@@@@@@@@@@@b');
+                colorMapFromArray:#[ 0 0 0 170 170 170 255 255 255 ];
+                mask:((ImageMask new)
+                            width:18;
+                            height:16;
+                            bits:(ByteArray 
+                                        fromPackedString:'_?>@???@???@???@???@???@???@???@???@???@???@???@???@???@???@_?>@');
+                            yourself);
+                yourself
+        ]
 !
 
 iconPrivateClass
+    <resource: #image>
     "This resource specification was automatically generated
      by the ImageEditor of ST/X."
-
     "Do not manually edit this!! If it is corrupted,
      the ImageEditor may not be able to read the specification."
-
     "
-     ImageEditor openOnClass:self andSelector:#iconPrivateClass
-    "
-
-    <resource: #image>
-
-    ^Icon
-        constantNamed:#'ResourceSelectionBrowser class iconPrivateClass'
-        ifAbsentPut:[(Depth2Image new) width: 18; height: 16; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@PUUUUU A****(@F*??* @Z+??*@A*/*>(OF*>+: @Z+??*@A*/?:(DF*>** @Z+:**@A*/**(@F*>** @Z****C2@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 255 0 0]; mask:((Depth1Image new) width: 18; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'_?>@???@???@???@???@???@???@???@???@???@???@???@???@???@???@_?>@') ; yourself); yourself]
+     ImageEditor openOnClass:self andSelector:#iconPrivateClass"
+    
+    ^ Icon constantNamed:#'ResourceSelectionBrowser class iconPrivateClass'
+        ifAbsentPut:[
+            (Depth2Image new)
+                width:18;
+                height:16;
+                photometric:(#palette);
+                bitsPerSample:(#( 2 ));
+                samplesPerPixel:(1);
+                bits:(ByteArray 
+                            fromPackedString:'@@@@@@PUUUUU A****(@F*??* @Z+??*@A*/*>(OF*>+: @Z+??*@A*/?:(DF*>** @Z+:**@A*/**(@F*>** @Z****C2@@@@@@@@@@@@@b');
+                colorMapFromArray:#[ 0 0 0 255 255 255 170 170 170 255 0 0 ];
+                mask:((ImageMask new)
+                            width:18;
+                            height:16;
+                            bits:(ByteArray 
+                                        fromPackedString:'_?>@???@???@???@???@???@???@???@???@???@???@???@???@???@???@_?>@');
+                            yourself);
+                yourself
+        ]
 ! !
 
 !ResourceSelectionBrowser class methodsFor:'interface specs'!
@@ -1028,3 +1064,4 @@
 version_CVS
     ^ '$Header$'
 ! !
+