How to use the CanvasPattern function from bindings

Find comprehensive JavaScript bindings.CanvasPattern code examples handpicked from public code repositorys.

268
269
270
271
272
273
274
275
276
277
}

createPattern (image, repetition = 'repeat') {
  const dye = image.nativeCanvas || image

  return new CanvasPattern(dye, repetition)
}

createRadialGradient (x0, y0, r0, x1, y1, r1) {
  return new CanvasGradient('radial', x0, y0, x1, y1, r0, r1)
fork icon1
star icon18
watch icon0

Other functions in bindings

Sorted by popularity

function icon

bindings.createKey is the most popular function in bindings (8616 examples)