Conversation
|
|
@agaget, at ESS we use the Image or Symbol widget for these use cases. Both can be rotated. Using an embedded display, and then rotate the content seems a bit odd. |
For me it's the same thing 😄 except I'm all Phoebus, it's vectorized and no need to find and masterize another software to create SVG at the correct SVG format (I know for sure every svg files are not compatible with Phoebus), and I can use rules and script |
|
A free tool like Inkscape can be used to create and manage SVGs. Indeed, support for SVG in Phoebus has limitations, but keep in mind that not all SVG tools create correct SVGs. Maintaining a SVG-based symbol in a dedicated app should in most cases be simpler than editing in Phoebus, which does not claim to be a first class drawing tool. |
|
I'd echo the "is this really necessary" concern. If it is, consider limiting the rotation to the As for '... embedded diplay is not square, when rotating it goes beyond the border.....': As for Lines 443 to 448 in d095b28 |
Yes I think it is. I could also argue that adding rotation to EmbeddedDisplay cover every future case for any need of a rotation, that nor you nor me have imagined yet.
Unfortunately I've already faced accelerator with angle being 22.5°, so I think it is usefull to get full range. Maybe I can limit it to -180° to 180° ?
will do |



I have added the function to rotate the embedded display.
context
PLC Guy are creating their own widget using Phoebus Polyline (no SVG and no special Java class they are not comfortable with java). Instead of creating one different for each angle we want, they want to be able to rotate the object
The base idea was to add the rotation function for the polyline widget, but fact is adding the rotation field to embedded display cover more case because I can create a bob with whatever I want in it.
How it works
Just added a Double rotation field in the widget, and it rotates the layout in the embedded display. It's a double because in javaFX the function setRotate of the Rotate object is a double

test
Tested with the different behaviour as seen above, seems to work fine. (stretch, resize etc ...)
Advantage
Disavantage
@lcaouen