image map
in
Programming Questions
•
2 years ago
I have a .jpg of a piano. When the mouse goes over the different keys I want to make different tones. The keys are all at angles and the same color so there's no easy way to pick them out. So, like in HTML how you can create image maps, how would you go about this in processing? Do I just make an array of the location of all the pixels in each key? I was doing println(mouseY*width+mouseX); and just going over the keys and writing down the coords. I stopped because it seems like there's got to be an easier way to do this...I couldn't find any info in the forums because I think I lack the exact vocabulary to find what I want.
Hopefully I'm making myself clear, though :-)
Thanks!
Hopefully I'm making myself clear, though :-)
Thanks!
2