M
M
Millerish2017-01-24 20:30:32
css
Millerish, 2017-01-24 20:30:32

How to merge elements on canvas?

Hello!
Is it possible somehow to merge elements on canvas? For example, circle and square.
If so, please leave a link or a title to read about.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim, 2017-01-24
@Millerish

canvas is just a canvas, just a method of displaying your picture, which can be represented by layers or objects. Those. using JS, create a variable "square" and at the right time call its draw method, which will draw a square on the canvas.
From the above, it follows that in order to combine elements on the canvas, it is worth using some kind of wrapper over the canvas, for example, this Fabric.js

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question