Matej Posted November 24, 2014 Share Posted November 24, 2014 Hello , i recently started digging in canvas and i'd like to ask some questions about it. Here is nice mozilla example http://jsfiddle.net/mpxestqw/2/; So my question is , how does save() works? Does it work like i set translate(0,0,50,50) and save it , than i set again translate(0,0,50,50) = which means translate is now(0,0,100,100) , and when i set restore() , translate is again translate(0,0,50,50)?; Also does clearRect() remove also translate() or only "picture"? Thanks for answers , have a nice day. Link to comment Share on other sites More sharing options...
justsomeguy Posted November 24, 2014 Share Posted November 24, 2014 There's a description about what save and restore do here:http://html5.litten.com/understanding-save-and-restore-for-the-canvas-context/ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now