I have probably managed to miss where this transition has been hashed out, so apologies if this sounds familiar.
I have several old codes (they started under a pretty early version of RB) and I had used offscreen bitmaps to build drawings and then blit them to the screen in the paint event (this was the old standard when you would get flickering if you directly drew to the screen). But now of course I wanted to take advantage of the HiDPI options and do this “right”. But the HiDPI help pages seemed oblivious to this approach, focusing either on importing graphics at different scales or noting that directly drawing to the screen would work as before. And so, question one is, is using an offscreen bitmap unnecessary now? The examples I looked at that ship with Xojo don’t use buffers.
OK, so I played with the GraphicalClockDemo to see if I could make it use an offscreen bitmap. What I did felt somewhat awkward, so question 2 is, is there a better way?
What I did was add a new picture in the paint event:
dim pp as Picture
dim gg as Graphics
pp= new Picture(me.Widthg.scaleX,me.Heightg.scaleY)
then make all the drawings go to gg and not g and in the end blit the picture to the screen:
If I omit the g.scale[XY] stuff, I get the low-res version.
Thanks for any insights, and again apologies if I am covering old ground here…