• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
ATSUI text in an NSView problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: ATSUI text in an NSView problems
      • From: Rosyna <email@hidden>
  • Prev by Date: Re: find - sort - locate.big...
  • Next by Date: Re: find - sort - locate.big...
  • Previous by thread: Re: Menu bar
  • Next by thread: Re: ATSUI text in an NSView problems
  • Index(es):
    • Date
    • Thread