Re: NSImage and WebKit
Re: NSImage and WebKit
- Subject: Re: NSImage and WebKit
- From: p3consulting <email@hidden>
- Date: Fri, 9 Jul 2004 08:45:01 +0200
See documentation:
isFlipped
- (BOOL)isFlipped
Returns YES if a vertically flipped coordinate system is used when
locating the position of the receiver and NO if it isnt. The default
is NO.
See Also: setFlipped:
Solution:
[myImage setFlipped:YES] ;
and remove your code manipulating the NSAffineTransform.
NB
More on the subject (in the context of a NSView) at
http://www.macosxguru.net/article.php?story=20040225223410877
Pascal Pochet
email@hidden
----------------------------------
PGP
KeyID: 0x208C5DBF
Fingerprint: 9BFB 245C 5BFE 7F1D 64B7 C473 ABB3 4E83 208C 5DBF
Le juil. 9, 2004, ` 08:14, Kevin Ballard a icrit :
>
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.
[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.