Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
RokuJoel
Binge Watcher

Re: Best way to DrawRotatedObject and DrawScaledObject toget

On legacy devices like the 1100, you can only use drawscaledobject in high quality mode if you are drawing from a region to a region, perhaps that is what is causing the black screen?

- Joel
0 Kudos
Komag
Roku Guru

Re: Best way to DrawRotatedObject and DrawScaledObject together?

After 4 years I have revisited this for a different section of my game! I also reviewed Romans Romans-I-XVI game engine code for this idea.

In the end it worked best for me to rotate first, scale second, with maybe a bit more complexity (although I didn't need a second region, just the second bitmap), mainly due to the fact that it eats up less texture memory. When scaling first, I had to make the second bitmap (for rotation) the full dimensions needed (in my case up to 2x). But when rotating first, you only have to make the second bitmap (for scaling) slightly bigger to accommodate the rotated image's corners, but then it can be scaled up a lot without using up extra texture memory. Whether this is the best approach for anyone in general depends on whether they're already using a lot of texture memory, whether they'll be enlarging the image significantly, and maybe some other factors.

And again, I greatly appreciate the code examples from NewManLiving, squirreltown, and Romans-I-XVI 🙂 Grasping how bitmaps and regions really work is STILL difficult for me.
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.