CodePudding user response:
Recommend the use of the fabric. Js operation canvas address: http://fabricjs.com/CodePudding user response:
You said this might call shear CTX. Clip ();Work principle is, first a shear area (such as a polygon), then no matter what you paint pictures or, as long as it is beyond the content of the shear zone, won't be displayed,
CodePudding user response:
First draw the path of the polygon, then use pictures as a fill style fillCTX. FillStyle=CTX. CreatePattern (image, "no - repeat");
CTX. The fill ();