Clip a image given xyhw
I have a spritesheet like image, and I only want to show a certain part of it.
I have the top, left, height and width of this part within the image, and I want the image to be 1em wide (this is different than the pixel width of the clipped section). The image() function with the xyhw seems like what I want, but it's not supported in browsers yet.
How do I do this?
1 Reply
it kinda depends how your sprite is set up. Is it something like a 5X5 grid, is it one long row or column? are you doing this as an html
img
or as a css background-image