Skip to main content



      Home
Home » Eclipse Projects » Sirius » Coloring shapes depending on associated rgb value
Coloring shapes depending on associated rgb value [message #1708827] Mon, 21 September 2015 10:36 Go to next message
Eclipse UserFriend
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?

index.php/fa/23327/0/

Thanks

EDIT: Added picture of meta-model

[Updated on: Tue, 22 September 2015 07:10] by Moderator

Re: Coloring shapes depending on associated rgb value [message #1709282 is a reply to message #1708827] Fri, 25 September 2015 11:08 Go to previous message
Eclipse UserFriend
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
Previous Topic:Edge towards/from container list
Next Topic:Cell inside a table with multiline text
Goto Forum:
  


Current Time: Thu Jul 10 05:14:56 EDT 2025

Powered by FUDForum. Page generated in 0.03900 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top