For those curious minds who are eager, as I once was, to know how to create a shaped window using Juce, I offer this simple demo. The project file is for Dev C++, but should easily be accessible in another IDE. The Main.cpp file can be altered in Jucer and the project compiled, instantly showing changes. Currently, however, Juce writes a g.fillAll command in the graphics section which must be commented out or deleted, otherwise the window will show as a rectangle.
Please be informed that, as I am a newbie to Juce and C++, the project may not be the most perfect example as to how one should best accomplish such a thing. This example, unlike my first example, belongs in the “Juce\Projects\Juce Shaped Window Demo” folder.
Somebody shoot me! I didn’t even notice the ‘alpha’ value in Jucer. That means this example can also utilize multiple layers of transparency directly through alterations in the Jucer file. It’s all over now!
If I resize this app to some bigger size, then the response to buttons becomes excessively slow, even if i redraw only the clip region. Is this normal, Jules?
I seems that an application not having a DocumentWindow gets terribly slow on GUI side. Is it still possible to make a “non-rectangular” app using DocumentWindow?
(doing a whiteTransparent document window gives an assertion)
It’s got nothing to do with it being a documentwindow - more likely you’re using a semi-transparent component, which is very slow on windows. See setOpaque().