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?


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 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:

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}].