I’m down to the very last few bugs in my cross-platform app!
This one might be new, because I updated everything to the modules branch recently… or I might not have noticed it before.
I have an SVG image that I use to make a mouse cursor of a magnifying glass. This cursor is transparent on OS/X, but it is not on Windows.
Interestingly enough, in a Windows debug build, the cursor background is a uniform grey - on Mac, the cursor background is a hodgepodge, leading me to believe I’m seeing uninitialized memory.
Here’s the code I use to create the icon:static juce::Image* getZoomCursor() {
ptr<juce::Image> img(new juce::Image(juce::Image::RGB, ZOOM_CURSOR_WIDTH,
ZOOM_CURSOR_HEIGHT, false));
Graphics g(*img);
ptr<Drawable> drawable(gui::icon::ZoomInCursor::create());
drawable->draw(g, 1.0f);
return img.transfer();
}
I unfortunately did play with that “clear” parameter in my experimentation. If I set it to “true”, then the cursor ends up being a completely black square, on Windows only, and again, perfectly OK on the Mac.
There must be some way in Windows to get partly transparent cursors - or else every Windows cursor would be rectangular shaped…!
I suppose that one was obvious in the end - you get blinded by the fact that it works on one platform and not the other.
Except for the bizarre “BD-ROM is recognized as some obscure German self-help CD” issue, which I have instrumented and hope to get more information on (and isn’t really a serious issue), this means I AM OUT OF BUGS AND CAN RELEASE MY PROGRAM!!!
Actually, I’m not even out of known bugs just “known bugs for this release”.
It’s a fun program, though I spent too much time on something so small. But I hadn’t done desktop development in almost two decades(!) so it was very instructive.