gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Drawing to screen - nothing appears?


From: Steven Schlansker
Subject: Drawing to screen - nothing appears?
Date: Fri, 19 Nov 2004 20:01:25 -0800
User-agent: Mozilla Thunderbird 0.8 (X11/20040913)

I'm trying to port an application that I've developed on Mac OS X to GNUStep/Linux and GNUStep/Windows. I'm currently running Gentoo with gnustep-base/gnustep-base-1.10.2_pre20041116 gnustep-base/gnustep-back-xlib-0.9.5_pre20041116 gnustep-base/gnustep-gui-0.9.5_pre20041116

I'm using the libart backend, but xlib doesn't work either.
The method I use for drawing goes like this:

[NSWindow lockFocus]
[NSColor set]
NSRectFill (to clear the screen)
for()
   [NSColor set]
   NSRectFill (to draw object)
[NSWindow unlockFocus]
[NSGraphicsContext flushGraphics]

Usually nothing shows in the window that I've created. Sometimes a rectangle appears as it should, but I can't figure out what triggers this or why, and it disappears on the next refresh. It works fine on Mac OS X. Is there something that I'm doing wrong?

Thanks for any pointers (except for nil ones ;) ),
Steven Schlansker




reply via email to

[Prev in Thread] Current Thread [Next in Thread]