I'm trying to draw some text in in a custom PowerPlant LPane using Quartz.
I have the text drawing OK, but am having problems because the y axis is
reversed when using Quartz so the location is incorrect.
My text is drawn correctly in the x position, but y seems bizarre. Y is
inverted (which I know from the Quartz docs), but also the offset seems very
strange. Y=0 does not seem to be the bottom of my LPane, or even the LPane's
owner window but rather some location about 80 pixels below the bottom edge
of my LPane.
I read the note in the Apple docs about how to invert the Y axis:
Code that transforms the Quartz origin to be at the upper-left
CGContextSaveGState (myContext);
CGContextTranslateCTM (myContext, 0, myOrigin.y + myPortHeight);
CGContextScaleCTM (myContext, 1.0f, -1.0f);
// Your drawing code here.
CGContextRestoreGState (myContext);
I'm not sure what values get and use for myOrigin.y and myPortHeight.
Thanks in advance.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartz-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartz-dev/email@hidden