Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Darken image



On Friday, July 20, 2001, at 02:18 , Tom Waters wrote:

assuming the method signature that you left out was:

- (void)drawRect:(NSRect)theRect

you are using theRect (which has nothing to do with the size of anything,
since it's merely the rectangle that has been exposed via the union of a bunch of calls to needsDisplayInRect) as the fromRect parameter in your call to drawInRect... this would cause random results..

use NSZeroRect there to indicate you want the whole source image.

Ah, problem solved! Thanks! Even those strange drawing artifacts I got are gone :)

I experimented with those parameters and used the arguments that produced better results, seems that they weren't the best choice :-)

I've hacked on a more complete version of the sample I sent you last time,
I'll send it along in the next email...

Thanks!

I'm currently developing a Finder-like icon view (already did one in Classic Mac OS/Powerplant), I'll release the source when it's finished.

andy
--
Discussion forthcoming.




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.