I am new to Juce, and I am looking for a graphics abstraction cross platform library to make a screensaver for windows and mac.
A screensaver gets a window handle from the operating system (HWND or NSVIEW) and on this window it must draw with a frequency of e.g 25 frames / sec
Question 1: Can juce achieve this frame rate with smoth animation without flicker (maybe double buffer?)
In my screensaver sceleton, I have an abstract class named “canvas” which is supposed to be the desktop window, and some abstract sprites (sprite, spriteText, spriteImage, etc) which are the objects to be moved and drawed on the canvas.
I am trying Juce as the cross platform library in order to implement the drawing of the canvas and sprites classes.
As canvas I am trying to have a juce::component that is addToDesktop() under the supplied HWND of the operating system. This indeed is able to detect the correct desktop dimentions but it is child of the actual window.
For the sprite classes I am thinking to use the Juce image and text compoments, add them to the canvas (juce::component) and then by changing their X,Y, move them arround.
I am not sure this is the best approach.
For example, I do not know how to implement the canvas.clear() function. This should erase the background of the component.
On the other hand, the juce::grapics class contains all the functionalities I need for my cross platform drawing, but I do not think I have access to it as a ready object, outsite the Paint(graphics &g) call back.
can you give me ideas on how to implement my abstract canvas and sprites classes with Juce ?