nhandt3 Posted April 19, 2017 Report Share Posted April 19, 2017 Hi, Can uGFX rotate an image with specific angle? I dont see the API in documents. Please help! Thanks, Nhan Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted April 19, 2017 Report Share Posted April 19, 2017 Hello @nhandt3 and welcome to the µGFX community! Unfortunately, the current version of the µGFX library doesn't offer any high-level API for that. Link to comment Share on other sites More sharing options...
nhandt3 Posted April 20, 2017 Author Report Share Posted April 20, 2017 hi Joel, Thanks for your quick reply, I see the API about matrix rotation. If I put my bitmap image to a matrix then rotate it, it's posible? Nhan Link to comment Share on other sites More sharing options...
inmarket Posted April 21, 2017 Report Share Posted April 21, 2017 You would need to decode your image into a pixmap. That would then give you the image in memory non-rotated. You could then build a rotation matrix and then point by point transfer the image to the display passing each x, y coordinate through your rotation matrix to get the destination x,y coordinate. Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted April 21, 2017 Report Share Posted April 21, 2017 6 hours ago, inmarket said: You would need to decode your image into a pixmap. That would then give you the image in memory non-rotated. To clarify: This is fairly easy as it's just two high-level API calls: gdispPixmapCreate() to create a valid GDisplay object and then pass that GDisplay* pointer as the first argument to your gdispGImageDraw() function. That's how you draw the image into the pixmap. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now