NSImage and WebKit
NSImage and WebKit
- Subject: NSImage and WebKit
- From: Kevin Ballard <email@hidden>
- Date: Fri, 9 Jul 2004 02:14:05 -0400
I just started looking at NSImage and I have to say it's a bit
confusing. Can I really only get TIFF data out of it (assuming I don't
have an NSPDFImageRep that I can get PDF data from)?
And here's the really bizarre bit. I'm trying to draw a WebKit view
into an image (actually, the document view for the WebKit). I can't use
dataWithPDFInsideRect: because that seems to drop some background
coloring. I've created an NSImage and locked focus on it, and I call
drawRect: on the document view (which is a plain NSView) and it draws
the whole thing upside-down! Each row of text is correct, but
everything else is upside-down, including the positioning of rows of
text! I have a TIFF image showing this, but it's 8MB. I can send it to
anybody who asks, tho.
Also, apparently this isn't drawing iframes.
I tried using NSAffineTransform to flip the whole thing vertically (set
Y scale to -1 and translate the Y axis by negative image height) and
now it looks correct except each row of text is upside-down!
Does anybody have any idea what's wrong here and how I can fix it?
Thanks,
Kevin
--
Kevin Ballard
email@hidden
http://www.tildesoft.com
http://kevin.sb.org
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.