javascript - Kineticjs: Image Stoke is not available when using hit region -


i use kineticjs hit region poposed in: http://www.html5canvastutorials.com/kineticjs/html5-canvas-pixel-detection-with-kineticjs/

my image has stroke:

var lion = new kinetic.image({           image: images.lion,           x: 280,           y: 30,           stroke: "red"          }); 

the image has stroke when did not use hit regions when use following did not see stroke.

    // in order ignore transparent pixels in image when detecting     // events, first need cache image     lion.cache();      // next, need redraw hit graph using cached image     lion.drawhitfromcache();      // finally, need redraw layer hit graph     layer.drawhit(); 

how can stroke visible image when use hit regions?

if want bounding box stroked can set drawborder property true:

lion.cache({     drawborder: true }); 

cheers!


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -