Coordinates from an image

Hello, I’m building an app where the user is required to click an image and the coordinates from that click are then further processed. Vaadin seems to only offer click coordinates relative to the user’s screen or browser. My app needs the coordinates to be relative to the component. Is there a way to accomplish this?