colors in distribution map

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

colors in distribution map

Usman Bhatti
Alex

We are improving the distribution customization points. Now we can give a title for distributionMap and subclasses.

We want to change the fill color of a linear distribution by default it is grey and we want to be able to let the user specify the color. 
How do we parameterize the linearFillColor below so that it represents various variation

LinearDistributionMap>>renderElementsFrom: node on: view
view interaction menuMorphBlock: [ :element | element mooseMenuMorph ].
view shape rectangle
size: 10;
linearFillColor: [ :e | elementsAndPropertyValue at: e ] within: elementsAndPropertyValue keys;
borderColor: self baseColor.
view nodes: (self orderElementsFor: node)

We saw that we can call linearRedFillColor: anObject within: aGroup
 instead of linearFillColor: [ :e | elementsAndPropertyValue at: e ] within: elementsAndPropertyValue keys;

but we would like to say specify a base color and that the distributionmap uses this color as a reference. 

packageVersionMap
"self packageVersionMap"
| dm |
dm := (LinearDistributionMap 
onContainers: (model allModelPackages) 
elements: #classes 
properties: [ :cl | cl parentPackage numberOfVersions]).
dm title: 'Package Versions'.
***> dm baseColor: Color red.
dm render. 
dm open.

and obtain the attached figure but without having to use at our level (distribution map) linearRedFillColor:

So alex would it be possible that we pass the highColor for a linearFill?

Stef and Ussman coding close the fireplace :)
Thanks


 Screen shot 2011-11-08 at 4.02.43 PM.png






_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: colors in distribution map

abergel
Humm, very long email.
Is it something like this that you need?

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
view shape rectangle
        linearFillColor: #yourself within: (1 to: 20) highColor: Color purple lowColor: Color green;
        size: 30.
view nodes: (1 to: 20).
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

I committed version 2.129 of Mondrian with this improvement.

There is linearFillColor:within:highColor: as well.

Alexandre


On 8 Nov 2011, at 07:08, Usman Bhatti wrote:

> Alex
>
> We are improving the distribution customization points. Now we can give a title for distributionMap and subclasses.
>
> We want to change the fill color of a linear distribution by default it is grey and we want to be able to let the user specify the color.
> How do we parameterize the linearFillColor below so that it represents various variation
>
> LinearDistributionMap>>renderElementsFrom: node on: view
>
> view interaction menuMorphBlock: [ :element | element mooseMenuMorph ].
> view shape rectangle
> size: 10;
> linearFillColor: [ :e | elementsAndPropertyValue at: e ] within: elementsAndPropertyValue keys;
> borderColor: self baseColor.
> view nodes: (self orderElementsFor: node)
>
> We saw that we can call linearRedFillColor: anObject within: aGroup
>  instead of linearFillColor: [ :e | elementsAndPropertyValue at: e ] within: elementsAndPropertyValue keys;
>
> but we would like to say specify a base color and that the distributionmap uses this color as a reference.
>
> packageVersionMap
> "self packageVersionMap"
>
> | dm |
> dm := (LinearDistributionMap
> onContainers: (model allModelPackages)
> elements: #classes
> properties: [ :cl | cl parentPackage numberOfVersions]).
> dm title: 'Package Versions'.
> ***> dm baseColor: Color red.
> dm render.
> dm open.
>
> and obtain the attached figure but without having to use at our level (distribution map) linearRedFillColor:
>
> So alex would it be possible that we pass the highColor for a linearFill?
>
> Stef and Ussman coding close the fireplace :)
> Thanks
>
>
>  <Screen shot 2011-11-08 at 4.02.43 PM.png>
>
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.





_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: colors in distribution map

Stéphane Ducasse

> Humm, very long email.
> Is it something like this that you need?
>
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> view shape rectangle
> linearFillColor: #yourself within: (1 to: 20) highColor: Color purple lowColor: Color green;
> size: 30.
> view nodes: (1 to: 20).
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Thanks alex.
This is important for us to get the DM fully customizable.
the idea is the we need an entry point to control the color with max hue
so having both
        linearFillColor: #yourself within: (1 to: 20) highColor: Color purple lowColor: Color green;
        and
        linearFillColor: #yourself within: (1 to: 20) highColor: Color purple;

would be good lowColor: could be in this case Color white.

So you solution is good.


>
> I committed version 2.129 of Mondrian with this improvement.
>
> There is linearFillColor:within:highColor: as well.
>
> Alexandre
>
>
> On 8 Nov 2011, at 07:08, Usman Bhatti wrote:
>
>> Alex
>>
>> We are improving the distribution customization points. Now we can give a title for distributionMap and subclasses.
>>
>> We want to change the fill color of a linear distribution by default it is grey and we want to be able to let the user specify the color.
>> How do we parameterize the linearFillColor below so that it represents various variation
>>
>> LinearDistributionMap>>renderElementsFrom: node on: view
>>
>> view interaction menuMorphBlock: [ :element | element mooseMenuMorph ].
>> view shape rectangle
>> size: 10;
>> linearFillColor: [ :e | elementsAndPropertyValue at: e ] within: elementsAndPropertyValue keys;
>> borderColor: self baseColor.
>> view nodes: (self orderElementsFor: node)
>>
>> We saw that we can call linearRedFillColor: anObject within: aGroup
>> instead of linearFillColor: [ :e | elementsAndPropertyValue at: e ] within: elementsAndPropertyValue keys;
>>
>> but we would like to say specify a base color and that the distributionmap uses this color as a reference.
>>
>> packageVersionMap
>> "self packageVersionMap"
>>
>> | dm |
>> dm := (LinearDistributionMap
>> onContainers: (model allModelPackages)
>> elements: #classes
>> properties: [ :cl | cl parentPackage numberOfVersions]).
>> dm title: 'Package Versions'.
>> ***> dm baseColor: Color red.
>> dm render.
>> dm open.
>>
>> and obtain the attached figure but without having to use at our level (distribution map) linearRedFillColor:
>>
>> So alex would it be possible that we pass the highColor for a linearFill?
>>
>> Stef and Ussman coding close the fireplace :)
>> Thanks
>>
>>
>> <Screen shot 2011-11-08 at 4.02.43 PM.png>
>>
>>
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: colors in distribution map

abergel
Yep! Let me know if I can help

Alexandre



Le 13 nov. 2011 à 04:59, Stéphane Ducasse <[hidden email]> a écrit :

>
>> Humm, very long email.
>> Is it something like this that you need?
>>
>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>> view shape rectangle
>>    linearFillColor: #yourself within: (1 to: 20) highColor: Color purple lowColor: Color green;
>>    size: 30.
>> view nodes: (1 to: 20).
>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>
> Thanks alex.
> This is important for us to get the DM fully customizable.
> the idea is the we need an entry point to control the color with max hue
> so having both
>    linearFillColor: #yourself within: (1 to: 20) highColor: Color purple lowColor: Color green;
>    and
>    linearFillColor: #yourself within: (1 to: 20) highColor: Color purple;
>
> would be good lowColor: could be in this case Color white.
>
> So you solution is good.
>
>
>>
>> I committed version 2.129 of Mondrian with this improvement.
>>
>> There is linearFillColor:within:highColor: as well.
>>
>> Alexandre
>>
>>
>> On 8 Nov 2011, at 07:08, Usman Bhatti wrote:
>>
>>> Alex
>>>
>>> We are improving the distribution customization points. Now we can give a title for distributionMap and subclasses.
>>>
>>> We want to change the fill color of a linear distribution by default it is grey and we want to be able to let the user specify the color.
>>> How do we parameterize the linearFillColor below so that it represents various variation
>>>
>>> LinearDistributionMap>>renderElementsFrom: node on: view
>>>    
>>>    view interaction menuMorphBlock: [ :element | element mooseMenuMorph ].
>>>    view shape rectangle
>>>        size: 10;
>>>        linearFillColor: [ :e | elementsAndPropertyValue at: e ] within: elementsAndPropertyValue keys;
>>>        borderColor: self baseColor.
>>>    view nodes: (self orderElementsFor: node)
>>>
>>> We saw that we can call linearRedFillColor: anObject within: aGroup
>>> instead of linearFillColor: [ :e | elementsAndPropertyValue at: e ] within: elementsAndPropertyValue keys;
>>>
>>> but we would like to say specify a base color and that the distributionmap uses this color as a reference.
>>>
>>> packageVersionMap
>>>    "self packageVersionMap"
>>>    
>>>    | dm |
>>>    dm := (LinearDistributionMap
>>>        onContainers: (model allModelPackages)
>>>        elements: #classes
>>>        properties: [ :cl | cl parentPackage numberOfVersions]).
>>>    dm title: 'Package Versions'.
>>>    ***> dm baseColor: Color red.
>>>    dm render.
>>>    dm open.
>>>
>>> and obtain the attached figure but without having to use at our level (distribution map) linearRedFillColor:
>>>
>>> So alex would it be possible that we pass the highColor for a linearFill?
>>>
>>> Stef and Ussman coding close the fireplace :)
>>> Thanks
>>>
>>>
>>> <Screen shot 2011-11-08 at 4.02.43 PM.png>
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev