Languages
[Edit]
EN

JavaScript - scale drawing on canvas

0 points
Created by:
Vanessa-Drake
718

In this article, we would like to show you how to

Quick solution:

 

Practical example

Edit

In this example, we use scale() method to add a scaling transformation to the canvas2 units horizontally and vertically.

See also

Edit
  1. JavaScript - draw square on canvas element

References

Edit
  1. CanvasRenderingContext2D.scale() - Web APIs | MDN

Alternative titles

  1. JavaScript - transform HTML canvas using scale()
  2. JavaScript - scale drawing on HTML canvas
  3. JavaScript - scale HTML canvas context
1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

JavaScript - HTML5 canvas tutorial

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join