[Lazarus] SVG Object
marc at dommelstein.nl
Mon Jan 17 11:55:19 CET 2022
I'm afraid there is no easy solution for that. SVGs are rendered from
the first element to the last, where ever element (atleast in theory)
can be a part of a given pixel. SVG elements do have a x,y,width,height
but they may also be part of one or more transformations.
To give you an idea, the (browser)app I'm currently working on displays
several object, where every object has an origin(x,y) of 0,0 and they
are finally placed by translations.
The easiest way (if you are in a browser context) is to add an onclick
handler to your elements of interest.
On 16-1-2022 23:34, Steve Gatenby via lazarus wrote:
> Not sure if this is the right place to ask about this one -
> I am using the BCSVGViewer from bgra controls - for SVG viewing
> obviously :)
> Would anybody know if there is a method to retrieve the object (within
> the svg) at specified x,y ?
> or is it possible to use embedded links within the svg ?
> I am looking to find which object has been clicked on within the svg to
> create a 'clickable' map
> Any suggestions on a better place to post this also appreciated
> Regards SteveG
More information about the lazarus