From: Gwenole B. <gb...@di...> - 2004-01-15 10:04:11
|
Hi, > New releases of SheepShaver (and B2) are badly needed, though... It was time to get a PPC emulator out as there are some other well known companies stepping down. ;-) > > * Support for copy-paste of text between MacOS and X11 through the clipboard > > What are your plans for graphics clipping? Mac->X11 might get very involved > with the handling of PICTs. I was thinking about grabbing the underlying pixels through an offscreen GWorld (where the PICT scrap would have been rendered). However, GetGWorld() doesn't return me valid information. I tried several things: a direct MacOS call, going through a native routine descriptor, or equivalent 68k code through _QDExtensions. The data was expected to be in stack but garbage got written in place of the actual GrafPort. This garbage looked like a CR register copy. So, I decremented the stack pointer further prior to _QDExtensions but this can't be correct according to the usual calling conventions. I even tried to add DisableInterrupt() and EnableInterrupt() around, in case that was our fault to clash the stack that way. No apparent change. The last resort is indeed to interpret the PICT opcodes ourselves. Though it will be faster than letting MacOS do that through e.g. PPC emulation, this will be less accurate as it doesn't seem all opcodes are fully documented. Handling PICT ourselves is quite a bit of work (even if there is some kind of support from picttoppm & ImageMagick), so I suspended that for now. Thinking about it, probably that implementing a CopyBits() replacement first will be a base for that as it too implies operations similar to some of the PICT opcodes. As for the target image format to propose to the X11 side, XPM & PPM are the simplest (but biggest) formats that are better known to other clients. Some others support "image/png" though. Bye, Gwenole. |