<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><BR><DIV><DIV>On Feb 22, 2007, at 0:14, Travis Griggs wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><DIV>I'm working on my VisualWorks Smalltalk interface to Cairo. In that environment, I have easy access to any NSWindow I open, and the ability to send objective-c messages. So what I do is basically:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>1) fetch the class named NSGraphicsContext</DIV><DIV>2) id nsGC = [NSGraphicsContext graphicsContextWithWindow: myNSWindow];</DIV><DIV>3) cgCtx = [nsGC graphicPort];</DIV><DIV>4) cairo_nquartz_surface_create_for_cg_context (cgCtx, 200, 200, 1); </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>But when I do drawing ops on that surface, nothing happens. :( Am I doing this right at all? Or is there a better/different way to do it? Do I need to send additional messages to the NSGraphicsContext or to the CGGraphicsContext (this is just a struct pointer,right?)?</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I'm using 1.2.6 (I think). I'm confused about the recent sent of messages regarding osx apis and stability thereof. Should I upgrade to the new snapshots for cairo?</DIV></BLOCKQUOTE></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>So, I was wrong. It is doing something. Just not right away. All I have to do is hide the window and reexpose it and then it's there! Yay. I've tried ending my drawing sequence with a surface flush. But that doesn't have any affect. If I use finish, it shows up right away, but of course, none of it can be used anymore (have to recreate the cairo objects).</DIV><BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 18px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV>--</DIV><DIV>Travis Griggs</DIV><DIV>Objologist</DIV><DIV>"Every institution finally perishes by an excess of its own first principle." - Lord Acton</DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR class="Apple-interchange-newline"></SPAN> </DIV><BR></BODY></HTML>