Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 14:36 Go to next message
Erlend Rommetveit is currently offline Erlend RommetveitFriend
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?

index.php/fa/23327/0/

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 Go to previous message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 500
Registered: July 2009
Location: Nantes, France
Senior Member
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
Previous Topic:Edge towards/from container list
Next Topic:Cell inside a table with multiline text
Goto Forum:
  


Current Time: Mon Jan 25 08:51:00 GMT 2021

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

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

Back to the top