|
From: | Ivan Vučica |
Subject: | Re: NSView and nil window |
Date: | Mon, 30 May 2016 20:52:32 +0100 |
On Thu, May 26, 2016, 13:06 Wolfgang Lux <address@hidden> wrote:
> Does it make sense to also draw it?
No. In the end, it is the window you are drawing to that determines the graphics context and without that there is nothing you can draw. Also, usually you don't draw a view yourself, but only when the window that contains the view asks you to do so. This is for optimized drawing, so that you can restrict drawing to just that part of a window that is actually visible. If you really need to draw a view that is not visible, create an offscreen window for that and attach the view to it.
Not sure why it would make no sense, you could* draw the view into a CGContext. Or otherwise offscreen.
* Not on GNUstep at the moment.
[Prev in Thread] | Current Thread | [Next in Thread] |