← Back to team overview

kicad-developers team mailing list archive

Re: Mac & "invalid context"

 

On 28. okt. 2007, at 11:13, jean-pierre charras wrote:

In this case, the Devices Contexts are differents...
The first DC is relative to the main draw area (the main panel), and the
second is relative to an other panel.

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 are handled.

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.

~/= Marius

--
We are Elektropeople for a better living.









References