ATSUI text in an NSView problems
ATSUI text in an NSView problems
- Subject: ATSUI text in an NSView problems
- From: Moray Taylor <email@hidden>
- Date: Sun, 14 May 2006 14:40:02 +0100
Hi,
I'm using ATSUI to draw text to an NSView, and it works great, apart
from one problem....
When I try to 'grab' an image of the NSView using
NSData * dat = [myView dataWithPDFInsideRect:NSMakeRect(0,0,500,500)];
[dat writeToFile:@"/Users/me/Desktop/test.pdf" atomically:YES];
I get a PDF with everything on it, apart from the text drawn with
ATSUI. This worked fine when I used NSAttributedString for my text,
but it was too slow (and a few other issues), so I had to go to ATSUI.
How can I get the ATSUI text included in the image? As I am trying to
create a thumbnail of my NSView, it looks a bit silly that none of
the text is included.
Thanks for any suggestions.
Moray
PS I also tried
NSBitmapImageRep * br = [myView
bitmapImageRepForCachingDisplayInRect:NSMakeRect(0,0,500,500)];
[myView cacheDisplayInRect:NSMakeRect(0,0,500,500)
toBitmapImageRep:br];
NSData * dat = [br TIFFRepresentation];
[dat writeToFile:@"/Users/me/Desktop/test.tiff" atomically:YES];
but got the same result (apart from the the result was a TIFF of course)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden