discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Bitmap code - 3rd alpha version


From: Fred Kiefer
Subject: Re: Bitmap code - 3rd alpha version
Date: Thu, 31 Jan 2002 23:15:48 +0100

I tested the new scaling code today for the first time. (Sorry, I was a
bit sick the last days) It is great to have image scaling in GNUstep
finally, for a long time I thought I was the only one asking for this. 

Sadly my first test with the nsimagecell.app in examples\gui\Old failed,
which may not so much be a problem of the new code. My current
impression is that a lot of code in the gui will need some rewrite to
catch up with this improvement. So far I found that the NSImage does not
propagate its size change to the NSImageReps and also does not
invalidate the cached reps, as it now should (when this flag is set).
Only when this is fixed will we see the full effect of scaling images.
Another problem that results from a recent change is that NSDrawBitmap()
sets just the current point, which is no longer used when drawing. So it
should now set (and later reset) the transformation, just as [NSImageRep
drawInRect:] does.

There also a few minor concerns with the new code. Having to build up
the dictionary and than decompose it again for the NSDrawBitmap() call
looks like a lot of overhead. Why not write a better image draw method
on XGGState, that will be called from DPSImage and NSDrawBitmap() just
with a lot of arguments. This than would call a setup method for the
_bitmap_decompose structure with all those simple arguments plus some X
state. This later could include most of the setup code at the start of
_bitmap_combine_alpha(). 

Just a few ideas.

Cheers
Fred




reply via email to

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