Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I "scale"? #12

Closed
earthling4211573 opened this issue Dec 10, 2010 · 1 comment
Closed

How do I "scale"? #12

earthling4211573 opened this issue Dec 10, 2010 · 1 comment

Comments

@earthling4211573
Copy link

HTML Canvas support scaling by doing ctx.scale(x,y), how is that functionality exposed in fabric.js?

I tried doing..
var ctx = canvas.getContext();
ctx.scale(650, 650);
..but that doesn't seam to do anything.

Also, is this is the right place to be asking such questions?

@kangax
Copy link
Member

kangax commented Dec 10, 2010

Scaling is available for each object (or group of objects). Take a look at http://kangax.github.com/fabric.js/docs/symbols/fabric.Object.html#scale (as well as scaleToHeight and scaleToWidth methods). There's no public API for scaling the entire canvas, although it shouldn't be hard to implement it.

I've just created a fabric.js google group to discuss things like that -- https://groups.google.com/group/fabricjs?hl=en Feel free to join

kangax pushed a commit that referenced this issue Feb 1, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants