0

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;
leppie
  • 115,091
  • 17
  • 196
  • 297
johnny
  • 53
  • 1
  • 5
  • I solve it with the pattern function. But the picture in there is moving with the layer (it's draggable). How can i stop this???? – johnny Mar 20 '14 at 09:45

1 Answers1

0

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

caleb531
  • 4,111
  • 6
  • 31
  • 41