Rotate NSTextView, distorted embedded image
Rotate NSTextView, distorted embedded image
- Subject: Rotate NSTextView, distorted embedded image
- From: Leonardo <email@hidden>
- Date: Sun, 23 Feb 2014 14:42:01 +0100
- Thread-topic: Rotate NSTextView, distorted embedded image
I create an NSTextView containing RTFD text, with a small image.
The result is ok until I rotate the textView. At 0º, 90º, 180º and 270º the
image within the text looks ok. But if I rotate the textView e.g. by 45º or
22º... the image looks distorted, as slanted, while the text looks good.
What do I miss there?
NSRect textFrame = NSMakeRect(100, -100, 200, 400);
textView = [[NSTextView alloc] initWithFrame:textFrame];
[mTextView setImportsGraphics:YES];
[mTextView setRichText:YES];
[[mTextView.layoutManager textStorage] setAttributedString:outString];
[mTextView setFrameCenterRotation:15];
mTextView.frame = textFrame;
[self.window.contentView addSubview:mTextView];
Regards
-- Leonardo
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden