canvas - drawing complex stroke (border) in KineticJS -


i have kineticjs image.

i want draw border around image.

to that, using stroke.

var x = new kinetic.image({     image: img,     stroke: 'red',     strokewidth: 5 } 
  • 1- have border rounded corners? here jsbin
  • 2- give border transparency gradually increases interior exterior (let say, opacity=0.9 opacity=0.3, linear decrease)

can achieve these stroke or need drawing line etc. , create group image?

1) can draw transparent kinetic.rect stroke , rounded corner image.

    var rect = new kinetic.rect({        x : image.x(),        y : image.y(),        width :image.width(),        height : image.height(),        stroke : 'blue',        storkewidth : 5,        cornerradius : 10     }); 

demo

2) there no easy way this. if wil draw stroke manually kinetic.line objects.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -