• 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
Rotate NSTextView, distorted embedded image
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: NSNumber : method to return pointer to represented value
  • Next by Date: Re: NSNumber : method to return pointer to represented value
  • Previous by thread: Re: A possibly simpler way to do custom Core Data migration
  • Next by thread: Forcing a CIFilter to Output
  • Index(es):
    • Date
    • Thread