|
Re: Custom style shapes [message #1835348 is a reply to message #1835170] |
Tue, 01 December 2020 10:35 |
|
Hello,
I don't think you need to create custom styles for the two first at least:
- Set the color dynamically based on an attribute: You have two options here. The first one is that in your layer, you add Style Customization that will change the color based on an attribute (so 1 Style customization per attribute value). The other option is to create a "Computed Color" (You can create a palette under the root of the odesign) where the red, green and blue fields are expression so you can have a service to determine it based on the attribute value.
- Let the user able to paint the element color: It is already available, in the tabbar you have a tool with the tooltip "Fill color". You can also find it in the appearance tab of the properties view.
- Plus: Besides color, I want to add texture (is that possible?). I think for this one I would rather go with the extension point to provide new Bundled Image[1] to provide a SVG with texture you want and you this extension point to change to color of the SVG.
You can implement this extension point (or the custom styles if you still want to try it) in the same project as your odesign.
[1]https://www.eclipse.org/sirius/doc/developer/extensions-provide_custom_bundled_image_shape.html
Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
Powered by
FUDForum. Page generated in 0.02330 seconds