Hello. GUI-O is a very interesting application. I have a question?
I use a horizontal BSL line
| BSL UID: bsl1 X: 0 Y: 50 ROT: 0 LEN: 100
Then I want to rotate it 37 degrees.
| BSL UID: bsl3 X: 0 Y: 50 ROT: 37 LEN: 100
This line is then not 100% long, which means it is not drawn in full screen mode.
How can I do this?
Thank you for trying the GUI-O application. I hope you will find it useful for your use cases.
Regarding your question... The line's rotation point is located at the start of the line. Specifying the rotation of 37 degrees means that the rotation is performed CCW (counter clockwise). To perform the CW (clockwise rotation, set the value to -37 degrees).
In order to extend the line to the edge of the screen you need to use a little trigonometry trick to calculate the new length:
new_length = current_length / cos(37°) = 100 / cos(37°) = 125.2
So, your initialization must be modified to:
|BSL UID:bsl3 X:0 Y:50 ROT:37 LEN:125.2
NOTE THAT PARAMETER AND VALUE MUST NOT BE SPACE SEPARATED, e.g., ROT:37 works, while ROT: 37 does not!
Hope you do some interesting project with the GUI-O application. You can always share them in our Share your projects category.