canvas - Replace javascript context.arc with an image -


i have code draw circle on canvas.

        create: function(){             context.beginpath();             context.arc(this.x, this.y, this.radius, 0, math.pi * 2, false);             context.fill();         } 

is possible replace circles images?

looks duplicate of html5 canvas - fill circle image.

there's clipping example on mdn: https://developer.mozilla.org/en-us/docs/web/api/canvas_api/tutorial/compositing#a_clip_example


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -