Capturing a view's drawings?
Capturing a view's drawings?
- Subject: Capturing a view's drawings?
- From: Uli Kusterer <email@hidden>
- Date: Sat, 1 Nov 2003 15:52:25 +0100
Hi folks,
I'm attempting to record an NSTextView's drawings into an NSImage, but
the drawing is always a little below the text view's drawing. Always
something in the range of two or three pixels. Anybody have a clue how
this works? I tried:
NSAffineTransform* at;
[finalImage lockFocus];
at = [NSAffineTransform transform];
[at translateXBy: [textbox frame].origin.x
yBy: [textbox frame].origin.y];
[at concat];
[textbox drawRect: [textbox bounds]];
[finalImage unlockFocus];
Where finalImage (an NSImage*) is the size of the view that contains
textbox. And the containing view fills the entire window. And I'm not
calling this from drawRect:.
Any clues appreciated.
Cheers,
-- M. Uli Kusterer
http://www.zathras.de
_______________________________________________
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.