Handle.getDimensionsSub

bool getDimensionsSub(out rsvg.types.DimensionData dimensionData, string id = null)

Get the size of a subelement of the SVG file. Do not call from within the size_func callback, because an infinite loop will occur.

This function depends on the [rsvg.handle.Handle]'s DPI to compute dimensions in pixels, so you should call [rsvg.handle.Handle.setDpi] beforehand.

Element IDs should look like an URL fragment identifier; for example, pass #foo (hash foo) to get the geometry of the element that has an id="foo" attribute.

Parameters

dimensionDataA place to store the SVG's size
idAn element's id within the SVG, starting with "#" (a single hash character), for example, #layer1. This notation corresponds to a URL's fragment ID. Alternatively, pass NULL to use the whole SVG.

Returns

TRUE if the dimensions could be obtained, FALSE if there was an error.

Deprecated

Use [rsvg.handle.Handle.getGeometryForLayer] instead.