[Top][All Lists]

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

State of initWithFocusedViewRect: on libart backend

From: Fred Kiefer
Subject: State of initWithFocusedViewRect: on libart backend
Date: Mon, 28 Jun 2004 14:15:37 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040114

I am thinking about improving the way we create image cursors. The current code wont work with a lot of iamge formats. Actually it does only work with RGBA, non-planar, 8 bit, not padded, non scaled bitmap image representations. To improve on this I would like to convert the image to a bitmap image first with:

  NSSize size = [image size];

  [image lockFocus];
rep = [[NSBitmapImageRep alloc] initWithFocusedViewRect: NSMakeRect(0, 0, size.width, size.height)];
  [image unlockFocus];

which should work fine on the xlib backend (the window backend doesn't even support iamge cursors for the moment). The most simple way to do this is to use the conversion on all images, but for this backart would need to implement GSReadRect:

Alex, do you see a chance to implement this? Adams implementation for xlib looks pretty forward to me.

While I was looking at the code in backart, I had some totally unrelated ideas. What about unifying the unmaintained string drawing code, that is all the other string showing Postscript commands apart from DPSshow? We could just move them up to GSGState and implement them via a DPSshowString:length: primitive. Not that anybody is using this methods now, but at least we wont have parts of them scattered everywhere in the backends.

And there my next question came up (I shouldn't be reading this much code): What is backart doing in [FTFontInfo drawString:at::to:::::color::::transform:] to convert from UTF8 to Unicode? Or more specific, in which regard is this conversion different from the one implemented in GSToUnicode in Unicode.m?


reply via email to

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