The Inbox: Graphics-ms.407.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

The Inbox: Graphics-ms.407.mcz

commits-2
A new version of Graphics was added to project The Inbox:
http://source.squeak.org/inbox/Graphics-ms.407.mcz

==================== Summary ====================

Name: Graphics-ms.407
Author: ms
Time: 20 March 2019, 1:51:42.768596 pm
UUID: 40a66bd7-815f-43f7-bbd0-31dc8da3a483
Ancestors: Graphics-mt.406

Adds a preview morph for results of all BitBlt rules.

When first using BitBlt, it wasn't easy to understand the effects of the possible rules on pixel combinating for me.
I implemented two example methods which preview the effects of rule 0 to 41 (these are all, I believe) on quadratic existing forms with colors and 1 bit alpha channel (previewAllBitBltRules uses ToolIcons flag/collection) plus Forms with more alpha values (previewAllBitBltRulesWithAlpha uses ToolIcons flag and a Color red + 0.4 alpha preview). They generate a combined morph for all rules applied on these forms (scaled, because icons are small) and opens it in your hand.
Internally, this morph can be generated for any rule, forms and scale. Rules which throw exceptions are replaced with a fallback form.

=============== Diff against Graphics-mt.406 ===============

Item was added:
+ ----- Method: BitBlt class>>previewAllBitBltRules (in category 'examples') -----
+ previewAllBitBltRules
+
+ (self previewBitBltRules: (0 to: 41)
+ on: ToolIcons flag
+ and: ToolIcons collection
+ fallback: ToolIcons exception
+ scaledTo: 32) openInHand.!

Item was added:
+ ----- Method: BitBlt class>>previewAllBitBltRulesWithAlpha (in category 'examples') -----
+ previewAllBitBltRulesWithAlpha
+
+ (self previewBitBltRules: (0 to: 41)
+ on: ToolIcons flag
+ and: ((Color red alpha: 0.4) iconOrThumbnailOfSize: 12)
+ fallback: ToolIcons exception
+ scaledTo: 32) openInHand.!

Item was added:
+ ----- Method: BitBlt class>>previewBitBltRules:on:and:fallback:scaledTo: (in category 'examples') -----
+ previewBitBltRules: rules on: aForm1 and: aForm2 fallback: fallbackForm scaledTo: aNumberOrPoint
+ "Returns a combined morph of the result of each rule applied on aForm1 combined with
+ aForm2 scaled to aNumberOrPoint. If the combination faild with a rule, fallbackForm is
+ shown instead. The number of each rule is appended at the bottom of each result."
+
+ | resultMorph tileExtent |
+ tileExtent := aNumberOrPoint asPoint.
+ resultMorph := Morph new
+ color: Color transparent;
+ extent: (rules size * tileExtent x)@tileExtent y;
+ yourself.
+
+ rules withIndexDo: [ :rule :index | | form formMorph numberLabel |
+ form := aForm1 copy.
+ [aForm2 copy displayOn: form at: 0@0 rule: rule]
+ on: Exception
+ do: [form := fallbackForm].
+ formMorph := (form scaledToSize: tileExtent) asMorph
+ position: (index*tileExtent x)@0;
+ yourself.
+ resultMorph addMorph: formMorph.
+
+ numberLabel := rule asString asMorph
+       center: ((index+0.5)*tileExtent x)@tileExtent y;
+ yourself.
+ resultMorph addMorph: numberLabel].
+
+ ^ resultMorph!


Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Graphics-ms.407.mcz

David T. Lewis
Hi Maximilian,

This looks like a good addition. It is small and useful, and it aids
understanding.

I am not very knowledgeable about the BitBlt rules, so maybe someone
else can look at it also? To me, this looks like a good contribution
for trunk.

Dave


On Wed, Mar 20, 2019 at 12:51:46PM +0000, [hidden email] wrote:

> A new version of Graphics was added to project The Inbox:
> http://source.squeak.org/inbox/Graphics-ms.407.mcz
>
> ==================== Summary ====================
>
> Name: Graphics-ms.407
> Author: ms
> Time: 20 March 2019, 1:51:42.768596 pm
> UUID: 40a66bd7-815f-43f7-bbd0-31dc8da3a483
> Ancestors: Graphics-mt.406
>
> Adds a preview morph for results of all BitBlt rules.
>
> When first using BitBlt, it wasn't easy to understand the effects of the possible rules on pixel combinating for me.
> I implemented two example methods which preview the effects of rule 0 to 41 (these are all, I believe) on quadratic existing forms with colors and 1 bit alpha channel (previewAllBitBltRules uses ToolIcons flag/collection) plus Forms with more alpha values (previewAllBitBltRulesWithAlpha uses ToolIcons flag and a Color red + 0.4 alpha preview). They generate a combined morph for all rules applied on these forms (scaled, because icons are small) and opens it in your hand.
> Internally, this morph can be generated for any rule, forms and scale. Rules which throw exceptions are replaced with a fallback form.
>
> =============== Diff against Graphics-mt.406 ===============
>
> Item was added:
> + ----- Method: BitBlt class>>previewAllBitBltRules (in category 'examples') -----
> + previewAllBitBltRules
> +
> + (self previewBitBltRules: (0 to: 41)
> + on: ToolIcons flag
> + and: ToolIcons collection
> + fallback: ToolIcons exception
> + scaledTo: 32) openInHand.!
>
> Item was added:
> + ----- Method: BitBlt class>>previewAllBitBltRulesWithAlpha (in category 'examples') -----
> + previewAllBitBltRulesWithAlpha
> +
> + (self previewBitBltRules: (0 to: 41)
> + on: ToolIcons flag
> + and: ((Color red alpha: 0.4) iconOrThumbnailOfSize: 12)
> + fallback: ToolIcons exception
> + scaledTo: 32) openInHand.!
>
> Item was added:
> + ----- Method: BitBlt class>>previewBitBltRules:on:and:fallback:scaledTo: (in category 'examples') -----
> + previewBitBltRules: rules on: aForm1 and: aForm2 fallback: fallbackForm scaledTo: aNumberOrPoint
> + "Returns a combined morph of the result of each rule applied on aForm1 combined with
> + aForm2 scaled to aNumberOrPoint. If the combination faild with a rule, fallbackForm is
> + shown instead. The number of each rule is appended at the bottom of each result."
> +
> + | resultMorph tileExtent |
> + tileExtent := aNumberOrPoint asPoint.
> + resultMorph := Morph new
> + color: Color transparent;
> + extent: (rules size * tileExtent x)@tileExtent y;
> + yourself.
> +
> + rules withIndexDo: [ :rule :index | | form formMorph numberLabel |
> + form := aForm1 copy.
> + [aForm2 copy displayOn: form at: 0@0 rule: rule]
> + on: Exception
> + do: [form := fallbackForm].
> + formMorph := (form scaledToSize: tileExtent) asMorph
> + position: (index*tileExtent x)@0;
> + yourself.
> + resultMorph addMorph: formMorph.
> +
> + numberLabel := rule asString asMorph
> +       center: ((index+0.5)*tileExtent x)@tileExtent y;
> + yourself.
> + resultMorph addMorph: numberLabel].
> +
> + ^ resultMorph!
>
>

Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Graphics-ms.407.mcz

Levente Uzonyi
I haven't tried the code yet, but based on the commit message, this is a
great contribution. Perhaps it would be worth to create a complete tool
showing the actual results.
I think this code belongs to Morphic/MorphicExtras rather than Graphics.
Graphics doesn't depend on Morphic, and it shouldn't, but these changes
would introduce that dependency.

Levente

On Thu, 21 Mar 2019, David T. Lewis wrote:

> Hi Maximilian,
>
> This looks like a good addition. It is small and useful, and it aids
> understanding.
>
> I am not very knowledgeable about the BitBlt rules, so maybe someone
> else can look at it also? To me, this looks like a good contribution
> for trunk.
>
> Dave
>
>
> On Wed, Mar 20, 2019 at 12:51:46PM +0000, [hidden email] wrote:
>> A new version of Graphics was added to project The Inbox:
>> http://source.squeak.org/inbox/Graphics-ms.407.mcz
>>
>> ==================== Summary ====================
>>
>> Name: Graphics-ms.407
>> Author: ms
>> Time: 20 March 2019, 1:51:42.768596 pm
>> UUID: 40a66bd7-815f-43f7-bbd0-31dc8da3a483
>> Ancestors: Graphics-mt.406
>>
>> Adds a preview morph for results of all BitBlt rules.
>>
>> When first using BitBlt, it wasn't easy to understand the effects of the possible rules on pixel combinating for me.
>> I implemented two example methods which preview the effects of rule 0 to 41 (these are all, I believe) on quadratic existing forms with colors and 1 bit alpha channel (previewAllBitBltRules uses ToolIcons flag/collection) plus Forms with more alpha values (previewAllBitBltRulesWithAlpha uses ToolIcons flag and a Color red + 0.4 alpha preview). They generate a combined morph for all rules applied on these forms (scaled, because icons are small) and opens it in your hand.
>> Internally, this morph can be generated for any rule, forms and scale. Rules which throw exceptions are replaced with a fallback form.
>>
>> =============== Diff against Graphics-mt.406 ===============
>>
>> Item was added:
>> + ----- Method: BitBlt class>>previewAllBitBltRules (in category 'examples') -----
>> + previewAllBitBltRules
>> +
>> + (self previewBitBltRules: (0 to: 41)
>> + on: ToolIcons flag
>> + and: ToolIcons collection
>> + fallback: ToolIcons exception
>> + scaledTo: 32) openInHand.!
>>
>> Item was added:
>> + ----- Method: BitBlt class>>previewAllBitBltRulesWithAlpha (in category 'examples') -----
>> + previewAllBitBltRulesWithAlpha
>> +
>> + (self previewBitBltRules: (0 to: 41)
>> + on: ToolIcons flag
>> + and: ((Color red alpha: 0.4) iconOrThumbnailOfSize: 12)
>> + fallback: ToolIcons exception
>> + scaledTo: 32) openInHand.!
>>
>> Item was added:
>> + ----- Method: BitBlt class>>previewBitBltRules:on:and:fallback:scaledTo: (in category 'examples') -----
>> + previewBitBltRules: rules on: aForm1 and: aForm2 fallback: fallbackForm scaledTo: aNumberOrPoint
>> + "Returns a combined morph of the result of each rule applied on aForm1 combined with
>> + aForm2 scaled to aNumberOrPoint. If the combination faild with a rule, fallbackForm is
>> + shown instead. The number of each rule is appended at the bottom of each result."
>> +
>> + | resultMorph tileExtent |
>> + tileExtent := aNumberOrPoint asPoint.
>> + resultMorph := Morph new
>> + color: Color transparent;
>> + extent: (rules size * tileExtent x)@tileExtent y;
>> + yourself.
>> +
>> + rules withIndexDo: [ :rule :index | | form formMorph numberLabel |
>> + form := aForm1 copy.
>> + [aForm2 copy displayOn: form at: 0@0 rule: rule]
>> + on: Exception
>> + do: [form := fallbackForm].
>> + formMorph := (form scaledToSize: tileExtent) asMorph
>> + position: (index*tileExtent x)@0;
>> + yourself.
>> + resultMorph addMorph: formMorph.
>> +
>> + numberLabel := rule asString asMorph
>> +       center: ((index+0.5)*tileExtent x)@tileExtent y;
>> + yourself.
>> + resultMorph addMorph: numberLabel].
>> +
>> + ^ resultMorph!
>>
>>

Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Graphics-ms.407.mcz

Eliot Miranda-2


On Thu, Mar 21, 2019 at 9:22 AM Levente Uzonyi <[hidden email]> wrote:
I haven't tried the code yet, but based on the commit message, this is a
great contribution. Perhaps it would be worth to create a complete tool
showing the actual results.
I think this code belongs to Morphic/MorphicExtras rather than Graphics.
Graphics doesn't depend on Morphic, and it shouldn't, but these changes
would introduce that dependency.

+1
 

Levente

On Thu, 21 Mar 2019, David T. Lewis wrote:

> Hi Maximilian,
>
> This looks like a good addition. It is small and useful, and it aids
> understanding.
>
> I am not very knowledgeable about the BitBlt rules, so maybe someone
> else can look at it also? To me, this looks like a good contribution
> for trunk.
>
> Dave
>
>
> On Wed, Mar 20, 2019 at 12:51:46PM +0000, [hidden email] wrote:
>> A new version of Graphics was added to project The Inbox:
>> http://source.squeak.org/inbox/Graphics-ms.407.mcz
>>
>> ==================== Summary ====================
>>
>> Name: Graphics-ms.407
>> Author: ms
>> Time: 20 March 2019, 1:51:42.768596 pm
>> UUID: 40a66bd7-815f-43f7-bbd0-31dc8da3a483
>> Ancestors: Graphics-mt.406
>>
>> Adds a preview morph for results of all BitBlt rules.
>>
>> When first using BitBlt, it wasn't easy to understand the effects of the possible rules on pixel combinating for me.
>> I implemented two example methods which preview the effects of rule 0 to 41 (these are all, I believe) on quadratic existing forms with colors and 1 bit alpha channel (previewAllBitBltRules uses ToolIcons flag/collection) plus Forms with more alpha values (previewAllBitBltRulesWithAlpha uses ToolIcons flag and a Color red + 0.4 alpha preview). They generate a combined morph for all rules applied on these forms (scaled, because icons are small) and opens it in your hand.
>> Internally, this morph can be generated for any rule, forms and scale. Rules which throw exceptions are replaced with a fallback form.
>>
>> =============== Diff against Graphics-mt.406 ===============
>>
>> Item was added:
>> + ----- Method: BitBlt class>>previewAllBitBltRules (in category 'examples') -----
>> + previewAllBitBltRules
>> +
>> +    (self previewBitBltRules: (0 to: 41)
>> +            on: ToolIcons flag
>> +            and: ToolIcons collection
>> +            fallback: ToolIcons exception
>> +            scaledTo: 32) openInHand.!
>>
>> Item was added:
>> + ----- Method: BitBlt class>>previewAllBitBltRulesWithAlpha (in category 'examples') -----
>> + previewAllBitBltRulesWithAlpha
>> +
>> +    (self previewBitBltRules: (0 to: 41)
>> +            on: ToolIcons flag
>> +            and: ((Color red alpha: 0.4) iconOrThumbnailOfSize: 12)
>> +            fallback: ToolIcons exception
>> +            scaledTo: 32) openInHand.!
>>
>> Item was added:
>> + ----- Method: BitBlt class>>previewBitBltRules:on:and:fallback:scaledTo: (in category 'examples') -----
>> + previewBitBltRules: rules on: aForm1 and: aForm2 fallback: fallbackForm scaledTo: aNumberOrPoint
>> +    "Returns a combined morph of the result of each rule applied on aForm1 combined with
>> +    aForm2 scaled to aNumberOrPoint. If the combination faild with a rule, fallbackForm is
>> +    shown instead. The number of each rule is appended at the bottom of each result."
>> +
>> +    | resultMorph tileExtent |
>> +    tileExtent := aNumberOrPoint asPoint.
>> +    resultMorph := Morph new
>> +            color: Color transparent;
>> +            extent: (rules size * tileExtent x)@tileExtent y;
>> +            yourself.
>> +
>> +    rules withIndexDo: [ :rule :index | | form formMorph numberLabel |
>> +            form := aForm1 copy.
>> +            [aForm2 copy displayOn: form at: 0@0 rule: rule]
>> +                    on: Exception
>> +                    do: [form := fallbackForm].
>> +            formMorph := (form scaledToSize: tileExtent) asMorph
>> +                    position: (index*tileExtent x)@0;
>> +                    yourself.
>> +            resultMorph addMorph: formMorph.
>> +
>> +            numberLabel := rule asString asMorph
>> +            center: ((index+0.5)*tileExtent x)@tileExtent y;
>> +                    yourself.
>> +            resultMorph addMorph: numberLabel].
>> +
>> +    ^ resultMorph!
>>
>>



--
_,,,^..^,,,_
best, Eliot


Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Graphics-ms.407.mcz

Karl Ramberg
There is a quite obscure paint tool, SpookyPaint, that one can experiment with and use the combination rules.


On Thu, Mar 21, 2019 at 9:14 PM Eliot Miranda <[hidden email]> wrote:


On Thu, Mar 21, 2019 at 9:22 AM Levente Uzonyi <[hidden email]> wrote:
I haven't tried the code yet, but based on the commit message, this is a
great contribution. Perhaps it would be worth to create a complete tool
showing the actual results.
I think this code belongs to Morphic/MorphicExtras rather than Graphics.
Graphics doesn't depend on Morphic, and it shouldn't, but these changes
would introduce that dependency.

+1
 

Levente

On Thu, 21 Mar 2019, David T. Lewis wrote:

> Hi Maximilian,
>
> This looks like a good addition. It is small and useful, and it aids
> understanding.
>
> I am not very knowledgeable about the BitBlt rules, so maybe someone
> else can look at it also? To me, this looks like a good contribution
> for trunk.
>
> Dave
>
>
> On Wed, Mar 20, 2019 at 12:51:46PM +0000, [hidden email] wrote:
>> A new version of Graphics was added to project The Inbox:
>> http://source.squeak.org/inbox/Graphics-ms.407.mcz
>>
>> ==================== Summary ====================
>>
>> Name: Graphics-ms.407
>> Author: ms
>> Time: 20 March 2019, 1:51:42.768596 pm
>> UUID: 40a66bd7-815f-43f7-bbd0-31dc8da3a483
>> Ancestors: Graphics-mt.406
>>
>> Adds a preview morph for results of all BitBlt rules.
>>
>> When first using BitBlt, it wasn't easy to understand the effects of the possible rules on pixel combinating for me.
>> I implemented two example methods which preview the effects of rule 0 to 41 (these are all, I believe) on quadratic existing forms with colors and 1 bit alpha channel (previewAllBitBltRules uses ToolIcons flag/collection) plus Forms with more alpha values (previewAllBitBltRulesWithAlpha uses ToolIcons flag and a Color red + 0.4 alpha preview). They generate a combined morph for all rules applied on these forms (scaled, because icons are small) and opens it in your hand.
>> Internally, this morph can be generated for any rule, forms and scale. Rules which throw exceptions are replaced with a fallback form.
>>
>> =============== Diff against Graphics-mt.406 ===============
>>
>> Item was added:
>> + ----- Method: BitBlt class>>previewAllBitBltRules (in category 'examples') -----
>> + previewAllBitBltRules
>> +
>> +    (self previewBitBltRules: (0 to: 41)
>> +            on: ToolIcons flag
>> +            and: ToolIcons collection
>> +            fallback: ToolIcons exception
>> +            scaledTo: 32) openInHand.!
>>
>> Item was added:
>> + ----- Method: BitBlt class>>previewAllBitBltRulesWithAlpha (in category 'examples') -----
>> + previewAllBitBltRulesWithAlpha
>> +
>> +    (self previewBitBltRules: (0 to: 41)
>> +            on: ToolIcons flag
>> +            and: ((Color red alpha: 0.4) iconOrThumbnailOfSize: 12)
>> +            fallback: ToolIcons exception
>> +            scaledTo: 32) openInHand.!
>>
>> Item was added:
>> + ----- Method: BitBlt class>>previewBitBltRules:on:and:fallback:scaledTo: (in category 'examples') -----
>> + previewBitBltRules: rules on: aForm1 and: aForm2 fallback: fallbackForm scaledTo: aNumberOrPoint
>> +    "Returns a combined morph of the result of each rule applied on aForm1 combined with
>> +    aForm2 scaled to aNumberOrPoint. If the combination faild with a rule, fallbackForm is
>> +    shown instead. The number of each rule is appended at the bottom of each result."
>> +
>> +    | resultMorph tileExtent |
>> +    tileExtent := aNumberOrPoint asPoint.
>> +    resultMorph := Morph new
>> +            color: Color transparent;
>> +            extent: (rules size * tileExtent x)@tileExtent y;
>> +            yourself.
>> +
>> +    rules withIndexDo: [ :rule :index | | form formMorph numberLabel |
>> +            form := aForm1 copy.
>> +            [aForm2 copy displayOn: form at: 0@0 rule: rule]
>> +                    on: Exception
>> +                    do: [form := fallbackForm].
>> +            formMorph := (form scaledToSize: tileExtent) asMorph
>> +                    position: (index*tileExtent x)@0;
>> +                    yourself.
>> +            resultMorph addMorph: formMorph.
>> +
>> +            numberLabel := rule asString asMorph
>> +            center: ((index+0.5)*tileExtent x)@tileExtent y;
>> +                    yourself.
>> +            resultMorph addMorph: numberLabel].
>> +
>> +    ^ resultMorph!
>>
>>



--
_,,,^..^,,,_
best, Eliot



Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Graphics-ms.407.mcz

marcel.taeumel
In reply to this post by Levente Uzonyi
+1 Graphics must not depend on Morphic. Put it into an extension category such as "*MorphicExtras".

Best,
Marcel

Am 21.03.2019 17:22:17 schrieb Levente Uzonyi <[hidden email]>:

I haven't tried the code yet, but based on the commit message, this is a
great contribution. Perhaps it would be worth to create a complete tool
showing the actual results.
I think this code belongs to Morphic/MorphicExtras rather than Graphics.
Graphics doesn't depend on Morphic, and it shouldn't, but these changes
would introduce that dependency.

Levente

On Thu, 21 Mar 2019, David T. Lewis wrote:

> Hi Maximilian,
>
> This looks like a good addition. It is small and useful, and it aids
> understanding.
>
> I am not very knowledgeable about the BitBlt rules, so maybe someone
> else can look at it also? To me, this looks like a good contribution
> for trunk.
>
> Dave
>
>
> On Wed, Mar 20, 2019 at 12:51:46PM +0000, [hidden email] wrote:
>> A new version of Graphics was added to project The Inbox:
>> http://source.squeak.org/inbox/Graphics-ms.407.mcz
>>
>> ==================== Summary ====================
>>
>> Name: Graphics-ms.407
>> Author: ms
>> Time: 20 March 2019, 1:51:42.768596 pm
>> UUID: 40a66bd7-815f-43f7-bbd0-31dc8da3a483
>> Ancestors: Graphics-mt.406
>>
>> Adds a preview morph for results of all BitBlt rules.
>>
>> When first using BitBlt, it wasn't easy to understand the effects of the possible rules on pixel combinating for me.
>> I implemented two example methods which preview the effects of rule 0 to 41 (these are all, I believe) on quadratic existing forms with colors and 1 bit alpha channel (previewAllBitBltRules uses ToolIcons flag/collection) plus Forms with more alpha values (previewAllBitBltRulesWithAlpha uses ToolIcons flag and a Color red + 0.4 alpha preview). They generate a combined morph for all rules applied on these forms (scaled, because icons are small) and opens it in your hand.
>> Internally, this morph can be generated for any rule, forms and scale. Rules which throw exceptions are replaced with a fallback form.
>>
>> =============== Diff against Graphics-mt.406 ===============
>>
>> Item was added:
>> + ----- Method: BitBlt class>>previewAllBitBltRules (in category 'examples') -----
>> + previewAllBitBltRules
>> +
>> + (self previewBitBltRules: (0 to: 41)
>> + on: ToolIcons flag
>> + and: ToolIcons collection
>> + fallback: ToolIcons exception
>> + scaledTo: 32) openInHand.!
>>
>> Item was added:
>> + ----- Method: BitBlt class>>previewAllBitBltRulesWithAlpha (in category 'examples') -----
>> + previewAllBitBltRulesWithAlpha
>> +
>> + (self previewBitBltRules: (0 to: 41)
>> + on: ToolIcons flag
>> + and: ((Color red alpha: 0.4) iconOrThumbnailOfSize: 12)
>> + fallback: ToolIcons exception
>> + scaledTo: 32) openInHand.!
>>
>> Item was added:
>> + ----- Method: BitBlt class>>previewBitBltRules:on:and:fallback:scaledTo: (in category 'examples') -----
>> + previewBitBltRules: rules on: aForm1 and: aForm2 fallback: fallbackForm scaledTo: aNumberOrPoint
>> + "Returns a combined morph of the result of each rule applied on aForm1 combined with
>> + aForm2 scaled to aNumberOrPoint. If the combination faild with a rule, fallbackForm is
>> + shown instead. The number of each rule is appended at the bottom of each result."
>> +
>> + | resultMorph tileExtent |
>> + tileExtent := aNumberOrPoint asPoint.
>> + resultMorph := Morph new
>> + color: Color transparent;
>> + extent: (rules size * tileExtent x)@tileExtent y;
>> + yourself.
>> +
>> + rules withIndexDo: [ :rule :index | | form formMorph numberLabel |
>> + form := aForm1 copy.
>> + [aForm2 copy displayOn: form at: 0@0 rule: rule]
>> + on: Exception
>> + do: [form := fallbackForm].
>> + formMorph := (form scaledToSize: tileExtent) asMorph
>> + position: (index*tileExtent x)@0;
>> + yourself.
>> + resultMorph addMorph: formMorph.
>> +
>> + numberLabel := rule asString asMorph
>> + center: ((index+0.5)*tileExtent x)@tileExtent y;
>> + yourself.
>> + resultMorph addMorph: numberLabel].
>> +
>> + ^ resultMorph!
>>
>>