Jump to content

[Need help] GUI on framebuffer shift and rotate problem


topsecret9x

Recommended Posts

Hi everyone,

Now I’m facing a problem like this:

My device’s lcd is 854x480 (already rotated with other software to be 480x854 as picture below), and the framebuffer is 480x854. So I have 2 options to match the framebuffer of ugfx with my lcd:      

 

      1. Increase framebuffer size, such as 854x480 (or 854x854), but whenever 1 axis becomes larger than 480, the GUI icons is tear shaped.

 

2.  Rotate, but as this picture below, I can’t have the right rotation GUI against the LCD. I already re-config the rotate formula in gdisp_lld_framebuffer.c but still can’t.

 

So please help me in this case, I really appreciate that. Thank you very much.

ugfx.jpg

Link to comment
Share on other sites

1 minute ago, Joel Bodenmann said:

My question is why you're doing the "already rotated with other software" part. Just let µGFX handle the orientation, it is doing that very well.
What are your reasons to rotate externally? You can just use gdispSetOrientation() to change your screen orientation.

because I used 2 layers, layer 1 is video, layer 2 is ugfx GUI, and ugfx can't rotate video, then I must use another software to rotate it, but that soft doesn't support both video and GUI at the same time, so my solution is using that soft for video, and ugfx for GUI. 

Link to comment
Share on other sites

 

14 minutes ago, Joel Bodenmann said:

My question is why you're doing the "already rotated with other software" part. Just let µGFX handle the orientation, it is doing that very well.
What are your reasons to rotate externally? You can just use gdispSetOrientation() to change your screen orientation.

I think my explanation already unhinged you. Sorry about that. I only need 1 thing in this case: 
How can I rotate the ugfx GUI as I mention in the picture above?

 

Edited by topsecret9x
Link to comment
Share on other sites

The rotation you show does not make sense. It is not rotation, nor is it reflection. Eg the blue and green rectangle objects have been rotated by 90 degrees but display has not. Note the rotated distances are different in the pictures you show.

The way to get the picture you desire is to change the coordinates of the rectangles you are drawing, not trying to rotate the display.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...