html 5 canvas text

Can we write on different angles on canvas? If yes, how? I want to write something on a click so need coordinates but when I use context.rotate() it doesn't stay at a fixed position. If I click at the right of screen the text is very close to pointer but if I click on right it moves away. So what's the solution?

Answers


Your answer can be found here: HTML5 Text Canvas rotate in case text width is lager than maximum width allowed

If you look at Simon's sample code http://jsfiddle.net/5UKE3/ you'll see where he saves the context, transforms the canvas then restores the context. This is key to what you are trying to achieve.

More on saving and restoring here: http://html5.litten.com/understanding-save-and-restore-for-the-canvas-context/


Need Your Help

Multiple SELECT's in one query

mysql sql

I'm having trouble executing multiple selects in one query. This is what I do:

Why is Mongoose replacing key/value pair in an object with _id?

javascript node.js mongodb mongoose backend

I am creating my first backend project with Node.js, Express.js and Mongoose. I have a user, with a list of stocks objects [{symbol: amount}].

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.