kicad-developers team mailing list archive
Mailing list archive
Re: Mac & "invalid context"
Marius Kintel <kintel@...>
Sun, 28 Oct 2007 18:22:24 +0100
On 28. okt. 2007, at 11:13, jean-pierre charras wrote:
Even in this case, it's not allowed. I'm not 100% sure why this is
so, but it has to do with how the drawing code is implemented
natively. My guess is that they use hardware-accelerated drawing
using Core Graphics (which again use OpenGL I guess). Thus all
restrictions are related to how graphics contexts in Core Graphics
In this case, the Devices Contexts are differents...
The first DC is relative to the main draw area (the main panel),
second is relative to an other panel.
Note that it's _nested_ contexts that are disallowed, not drawing
outsite the paint event (AFAIU).
It should thus not be a problem constructing and destructing a lot of
DCs serially, or pass existing DCs onto drawing functions which today
create their own DC on the stack.
We are Elektropeople for a better living.