• 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
Re: Flipping Text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Flipping Text


  • Subject: Re: Flipping Text
  • From: Matt Neuburg <email@hidden>
  • Date: Tue, 30 Jan 2007 09:28:35 -0800
  • Thread-topic: Flipping Text

On Sun, 28 Jan 2007 22:38:51 -0500, Dave Fernandes
<email@hidden> said:
>I have
>an NSView with a flipped coordinate system. I draw text and bezier
>paths into an NSImage with a flipped coordinate system. And then I
>composite the image into the view.
>
>Problem: the graphics look fine, but the text is upside-down.
>
>I understand the poster's workaround to the problem, but I am hoping
>someone has a more elegant solution. Is there anyway to get a non-
>flipped graphics context when I draw my image?

Straight from the docs:

    NSAffineTransform* t = [NSAffineTransform transform];
    [t translateXBy: 0.0 yBy: [im size].height];
    [t scaleXBy: 1.0 yBy: -1.0];
    [NSGraphicsContext saveGraphicsState];
    [t concat];
    // draw here
    [NSGraphicsContext restoreGraphicsState];

More that, without seeing your code, is hard to say. m.

--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>



_______________________________________________

Cocoa-dev mailing list (email@hidden)

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

  • Follow-Ups:
    • Re: Flipping Text
      • From: Dave Fernandes <email@hidden>
  • Prev by Date: Close all windows
  • Next by Date: Re: Close all windows
  • Previous by thread: Re: Flipping Text
  • Next by thread: Re: Flipping Text
  • Index(es):
    • Date
    • Thread