Rotate screen #2693
Replies: 5 comments 5 replies
-
Edit: I can rotate my touch screen. I also managed to rotate and translate the femtovg canvas. What I didn't master was resizing the canvas to the new dimensions. My screen is physically w: 1024 and h: 600. After rotation the displayed window has w:600 and h:600, it seems to be cut of... is there any way to change canvas size after rotation? |
Beta Was this translation helpful? Give feedback.
-
Nice... I will try that. |
Beta Was this translation helpful? Give feedback.
-
Like I said, the vivante drivers don't support low level rotation. Qt worked fine offering rotation for screen and touch... But that's what I want to replace.. |
Beta Was this translation helpful? Give feedback.
-
That's a funny result...
I then rotate my canvas like this:
this is my main:
What happens is:
if i change somehow i need to change the visible window size to the right values without changing the inner size... |
Beta Was this translation helpful? Give feedback.
-
ok, solved it by using a main window with 1024 x 1024 and a rectangle in main window with h: 1024 and w: 600 which i fill with my design. Everything within this rectange is placed as expected. but as an info: even when changing main window size by using a button to h:1024 and w:600, it would cut my rotated window to h:600, leaving one third of the screen in black. I had a similar problem using the touch of my screen.. 0|0 and directions of axes is fine, but i had to scale the axes of x and y to get the right results, else the physical point of 600|1024 (right bottom corner) would give a pressed-x and pressed-y of 1024|600. not because x and y is changed (i tried by switching them) but just for the scaling. I added a calculation like
which finally got the touch working too. Maybe this experience can give you some hints if you ever plan a feature for rotation of main window with all children. I was able to hardcode everything i need for my tests of slint, so I close this now... |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Is it possible (maybe by configuring femtovg) to rotate the application window? I am running slint on an old imx6 Board which doesnt support rotating using Xorg. When using Qt it's pretty easy to rotate main window, but qt is the thing I wanna get rid of...
Beta Was this translation helpful? Give feedback.
All reactions