erase then draw image?
erase then draw image?
- Subject: erase then draw image?
- From: matt neuburg <email@hidden>
- Date: Wed, 16 Oct 2002 11:30:29 -0700
I'm trying to do something very simple - draw a watermark (some transparent text, slightly rotated) into an NSView.
My approach is to set up the text beforehand by drawing it into an NSImage. My NSView's coordinate system is slightly rotated. In my NSView's drawRect I then say simply:
[image drawInRect: dest
fromRect: wholeThing
operation: NSCompositeSourceOver fraction:0.2];
This works great except that every time drawInRect is called, my watermark gets darker and darker until finally it is opaque. It seems what I need to do is somehow flush or clear my NSView each time before I draw. But I can't find a command to do this: NSEraseRect fills it with white, drawing with clearColor fills it with black. How do I do it? Thx - m.
matt neuburg, phd = email@hidden,
http://www.tidbits.com/matt
pantes anthropoi tou eidenai oregontai phusei
Subscribe to TidBITS! It's free and smart.
http://www.tidbits.com/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.