Re: Flipping Text
Re: Flipping Text
- Subject: Re: Flipping Text
- From: Dave Fernandes <email@hidden>
- Date: Sun, 28 Jan 2007 22:38:51 -0500
I have exactly the problem described by this previous poster. 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? It seems rather
inefficient to have to copy the image twice to get the text right-
side-up.
- Dave
Subject: Re: Flipping Text
From: Ian was here <email@hidden>
Date: Wed, 9 Nov 2005 15:21:25 -0800 (PST)
The view and image are both flipped before text is
being drawn in. I found a solution to the problem:
The view is flipped, but I do not set the image to be
flipped. I draw the text onto the image, then I do an
affine transformation onto a temporary image that
cuases it to flip vertically. Then I apply the
temporary image onto the view.
--- Douglas Davidson <email@hidden> wrote:
>
> On Nov 9, 2005, at 9:20 AM, Ian was here wrote:
>
> > I have a flipped view that I am display images in.
> > Each image has text drawn onto it (before being
> > rendered into the view), then the image is flipped
> to
> > match the view using [theImage setFlipped:YES];
> >
> >
> > When the image is rendered into the view, it looks
> > correct; except for the text on the image, it's
> upside
> > down! The text does not seem to flip with the
> image
> > after it's been rendered to the image.
> >
>
> The text system generally assumes flippedness. Try
> flipping the
> image before drawing text into it.
>
> Douglas Davidson
_______________________________________________
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