Is there a possibility to fill a rectangle with a picture and not with color in jCanvas?
I would repeat the pic in the rectangle like in css for example:
background-repeat: repeat;
To fill a pattern with an image, use the createPattern()
method built into jCanvas. However, due to the limitations of the HTML5 canvas API, you cannot offset a pattern (so as to move it with a draggable layer).
-Caleb
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.