2022-02-07 02:30 AM
2022-02-07 02:42 AM
The line object is drawn with preset coordinates, which you must of course adjust (lower half of the Properties panel):
Start Position: X=5, Y=5
End Position: X=95, Y=45
If you set the End Position to e.g. Y=5, you will get a horizontal line whose centre line runs on the vertical offset 5.
Please consider that the line also has a Cap Style and a Line Width (default 10).
Good luck!
Regards
/Peter
2022-02-07 02:42 AM
The line object is drawn with preset coordinates, which you must of course adjust (lower half of the Properties panel):
Start Position: X=5, Y=5
End Position: X=95, Y=45
If you set the End Position to e.g. Y=5, you will get a horizontal line whose centre line runs on the vertical offset 5.
Please consider that the line also has a Cap Style and a Line Width (default 10).
Good luck!
Regards
/Peter
2022-02-07 02:49 AM
It worked! Thank you very much!
2022-02-07 03:29 AM
If the problem is resolved, please mark this topic as answered by selecting Select as best. This will help other users find that answer faster.
/Peter
2022-04-12 06:22 PM
I would also point out that if all you want to do is have a horizontal separator, I wouldn't use touchgfx::Line since it needs its own canvas so it's expensive. I would just use touchgfx::Box and set the width as desired and set the height to eg 1 or 2 pixels.