Drawing Text At an Angle

Hello All:

I am having an issue of drawing some text at an angle where the text is on a surface where the surface is angled to the back. (Here comes some waving hands - I can't find a way to attach an image). So if the object is a simple cube, the side that is facing you is not straight (at 90°), it's at 120° - leaning to the back. I can draw text using core text at any sort of rotation about a single point, but I can't figure out if it's the transform or the rotation I have to 'fiddle with' to draw the text like I want it.

So, is CoreText the correct library to use? If not is there an appropriate system library to use. If CoreText is the correct system library, a hint on how to setup CoreText for this would be appreciated.

Stay Safe


John
Well after a wee dram of Grand Marnier, I think I got this figured out. There are CATransform3D structures that have a m34 property and the trick was to set that to an appropriate value that controls how much 'tilt' there is in the text. You also have to apply a CATransform3DRotate to the text. Then in a text view layer, apply the transform to the layer that contains your text.

Whew!

I'll try and strip the code down to something small and post it here (for posterity ;-))

John
Drawing Text At an Angle
 
 
Q