Handle.getPositionSub

Get the position 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.

More...
class Handle
bool
getPositionSub

Parameters

positionData rsvg.types.PositionData

A place to store the SVG fragment's position.

id string

An 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.

Return Value

Type: bool

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

Detailed Description

Deprecated: Use rsvg.handle.Handle.getGeometryForLayer instead. This function is deprecated since it is not able to return exact floating-point positions, only integer pixels.