Coloring shapes depending on associated rgb value [message #1708827] |
Mon, 21 September 2015 14:36 |
Erlend Rommetveit Messages: 10 Registered: July 2015 |
Junior Member |
|
|
Hi.
I have a very simple meta-model with shapes that have a reference to a color element containing 3 values: red, green and blue.
Is it possible to create a shape that gets its color based on this element?
For instance, if I create a color in the instance model and associate a shape with this color, the shape will change color to those rgb-values?
Thanks
EDIT: Added picture of meta-model
[Updated on: Tue, 22 September 2015 11:10] Report message to a moderator
|
|
|
Re: Coloring shapes depending on associated rgb value [message #1709282 is a reply to message #1708827] |
Fri, 25 September 2015 15:08 |
|
Hi Erlend,
Le 21/09/2015 16:36, Erlend Rommetveit a écrit :
> Hi.
> I have a very simple meta-model with shapes that have a reference to a
> color element containing 3 values: red, green and blue.
> Is it possible to create a shape that gets its color based on this element?
> For instance, if I create a color in the instance model and associate a
> shape with this color, the shape will change color to those rgb-values?
I think you should take a look to [1].
You can create a User Color Palette in your Viewpoint Specification
Model with Computed Colors.
Then, you can reference those color from the style descriptions in your
mappings.
The red, blue, green interpreted expressions will be evaluated on the
semantic element associated to the each graphical element.
>
> Thanks
Regards
--
Maxime - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
--
[1]
https://www.eclipse.org/sirius/doc/specifier/general/Colors.html#computed_colors
Maxime Porhel - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
Powered by
FUDForum. Page generated in 0.01956 seconds