[cairo] svg - significance of surface6 id? might change?

Daniel Goldman dagoldman at yahoo.com
Sun Feb 7 04:56:07 UTC 2021


Hi,

I use cairo to make maps from Vitalnet C application that I write and maintain. Historically, I made PNG and PDF maps (which are great). I recently modified the Vitalnet source code to also produce SVG maps. It works fine, the SVG maps look great.

I would like to allow panning / zooming the SVG maps. I know that to do that requires javascript coding, and an id within the SVG code. I'm comfortable with that.

https://www.petercollingridge.co.uk/tutorials/svg/interactive/pan-and-zoom/ is an article I found.

https://github.com/ariutta/svg-pan-zoom is a library I found.

///////////////// My question

When I make the cairo SVG map, <g id="surface6"> is always generated so far. Can I count on surface6 id not changing? Is it hard-coded, or might change (eg, surface7)? What is significance (if any) to surface6 id, or just hard-coded arbitrary id?

Thanks,
Daniel

PS - I am not asking for help with javascript coding. Mostly want to clarify significance of surface6 id, and if might change.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cairographics.org/archives/cairo/attachments/20210207/18ac537e/attachment.htm>


More information about the cairo mailing list