Re: ATSUI text in an NSView problems
Re: ATSUI text in an NSView problems
- Subject: Re: ATSUI text in an NSView problems
- From: Moray Taylor <email@hidden>
- Date: Mon, 15 May 2006 09:50:33 +0100
Thanks for replying Rosyna, I've just found the problem, but I
thought I'd reply just in case someone else had the problem
I'm doing the ATSUI drawing within the drawRect: of my custom
NSView, I'm getting the context with
NSGraphicsContext * currentContext = [NSGraphicsContext
currentContext];
CGContextRef myContext = [currentContext graphicsPort];
But I was caching the context, which is a bad idea, as it goes out of
date, make sure you set the context every time you draw.
Moray
How are you drawing the ATSUI text? Are you drawing it into the
CGContextRef that represents the NSView?
Ack, at 5/14/06, Moray Taylor said:
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.
--
Sincerely,
Rosyna Keller
Technical Support/Holy Knight/Always needs a hug
Unsanity: Unsane Tools for Insanely Great People
It's either this, or imagining Phil Schiller in a thong.
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
______________________________________________________________________
LEGAL NOTICE:This e-mail has been sent to you by DataActive
Communications Ltd. This communication, and the information it
contains, is intended for the person(s) or organisation(s) to whom it
is addressed. Its contents are confidential and may be protected in
law. Unauthorised use, copying or disclosure of any of it may be
unlawful. If you are not the intended recipient, please notify the
sender by replying with 'Received in error' as the subject and then
delete it from your mailbox. Any views or opinions presented are
solely those of the author and do not necessarily represent those of
DataActive Communications Ltd. Although this e-mail and any
attachments are believed to be free of any virus or other defects
which might affect any computer or IT system into which they are
received, no responsibility is accepted from DataActive Communications
Ltd, or any of its associated companies for any loss or damage
arising in any way from the receipt or use thereof. We recommend that
you should carry out your own virus checking procedure before opening
any attachment.
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
_______________________________________________
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