raphael - Change image color in RaphaelJS -


good afternoon. have following question: use rafael js render multiple shapes , pictures. can change color of figures without problems. there way change color of picture?

not important image format, main thing able change color. example draw white car.

car = r.image ('car-white.png', car_pos.x, car_pos.y, car_w, car_h); 

on page following code:

<image x = "168.36" y = "54.14" width = "59.10" height = "49.10231526692708" preserveaspectratio = "none" xmlns: xlink = "http://www.w3.org/1999/xlink" xlink: href = "car-white.png" transform = "matrix (1,0,0,1,0,0)" style = "- webkit-tap-highlight-color: rgba (0, 0, 0, 0); "></ image> 

i looked on internet problem, , everywhere advised use canvas. raphaeljs not canvas, , find way around problem.

if format of image not important, make them svgs (if possible). can import them raphaeljs , manipulate these (just use converter this). can not manipulate other formats raphael (like png, jpeg, bmp...) vector graphics (svgs) or graphics created through raphael.

another possibility btw. include vector graphics html set classes or identifiers , use jquery ui manipulate colors.


Comments

Popular posts from this blog

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -