printing rotated text?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
Mr. Strange
Party member
Posts: 101
Joined: Mon Aug 11, 2008 5:19 am

printing rotated text?

Post by Mr. Strange » Wed Feb 24, 2010 11:24 pm

I can print rotated text, and I can print formatted text (formatted means aligned and wrapped after some number of characters).

But I cannot print rotated formatted text. Will this be added to love sometime soon?

-- Mr. Strange

User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: printing rotated text?

Post by Robin » Thu Feb 25, 2010 1:06 pm

Actually, you can.

But for that you need to rotate the whole graphics thingy, with some undocumented function:

Code: Select all

love.graphics.push()
love.graphics.rotate(angle)
love.graphics.printf(text, x, y, xwrap)
love.graphics.pop()
Help us help you: attach a .love.

Mr. Strange
Party member
Posts: 101
Joined: Mon Aug 11, 2008 5:19 am

Re: printing rotated text?

Post by Mr. Strange » Fri Feb 26, 2010 9:27 pm

Nice! I have to do some tricky math to adjust for the new coordinate system, but it's totally worthwhile to get my card text printing consistently.

Thanks much for this!

Post Reply

Who is online

Users browsing this forum: Imagic and 16 guests