[quote=“juicelover”]Hi valley
thanks again for your swift reply [are you some sort of answering machine? :)][/quote]
No, I’m just sad.
I’d agree in general, but I really do think that in this case, Polygons are too much of a thing unto themselves. If you just want to draw shapes, use the paths class. Really it’s just a polygon class under a different name, but way more useful. If you need intersections, then that’s such a specialized thing that I don’t see much use for the general form.
Well as I say, for drawing and paint programs, you’re at the mercy of the OS for when actual painting is getting done. Just because you’ve drawn something on a graphics context in no way guarantees that the OS is going to render that to the screen[1][2]. It’ll just add it to the list of things to do when it next gets round to it. Having a simple painter method means that all of your clipping logic can be in one place, and will be called in an entirely deterministic manner. That’s a good thing IMHO. The only cost is that you have to call repaint() to start the painting process.
For games though, you’d most likely be using OpenGL anyway, and that’s a whole different animal. In that case though, you can paint as and when you want, so you get to work in the way you’re expecting.
[quote]
apology,for annoying you[/quote]
Annoying me? Not at all.
[1] I think OSX and Vista are pretty good in this regard. I’m not so sure about X11. Win32 can be kind of clunky about how and when screen updates occur.
[2] also remember that in JUCE graphics contexts may well be devices such as printers, so you shouldn’t be making any assumptions.