bug-gnustep
[Top][All Lists]
Advanced

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

Re: NSImageView


From: Nicola Pero
Subject: Re: NSImageView
Date: Sat, 22 Jun 2002 19:59:26 +0100 (BST)

On Fri, 21 Jun 2002, Marko Riedel wrote:

> 
> Hi all,
> 
> this refers to gnustep-gui-0.7.7. 
> 
> I noticed that NSImageView doesn't override drawRect with a composite
> operation. Shouldn't it? I'll use my own image view In the meantime
> (needs only a few lines of code).

I think NSImageView is supposed to use NSImageCell to draw, so drawRect:
(which should be called after clipping to the exposed rect), and ask to
the cell to draw the whole of itself - which is what it does I think.

I assume that your idea is that by overriding drawRect: with a composite
operation you get better performance.

This might be true ... I'm not sure - I suppose a similar optimization is
supposed to be happening automatically somewhere in the backend.

We can't change the API, so we probably can't just use a composite
operation in NSImageView, but must do things properly and optimize
properly the image drawing to the clipped area in the backend.




reply via email to

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