summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@gnome.org>2022-03-16 10:43:20 -0600
committerFederico Mena Quintero <federico@gnome.org>2022-03-16 10:43:50 -0600
commit5e492c0fcb02f3589be6badbb35b4b9b019ec602 (patch)
tree75705614fb90144aed7688812deb90666e3be7c2 /doc
parent9ea87968112b2e43de6f8d803030441655c63007 (diff)
downloadlibrsvg-5e492c0fcb02f3589be6badbb35b4b9b019ec602.tar.gz
(#853): Fix incorrect suggestion in API docs about measuring geometries
It suggested get_geometry_for_layer instead of get_geometry_for_element; the latter is correct. Fixes https://gitlab.gnome.org/GNOME/librsvg/-/issues/853 Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/682>
Diffstat (limited to 'doc')
-rw-r--r--doc/migrating.md13
1 files changed, 6 insertions, 7 deletions
diff --git a/doc/migrating.md b/doc/migrating.md
index 962da59d..84b83038 100644
--- a/doc/migrating.md
+++ b/doc/migrating.md
@@ -254,13 +254,12 @@ document's aspect ratio.
### SVGs with no intrinsic dimensions nor aspect ratio
-SVG documents that have none of the `width`, `height`, or `viewBox`
-attributes are thankfully not very common, but they are hard to deal
-with: the software cannot immediately know their natural size or aspect
-ratio, so they cannot be easily scaled to fit within a viewport. Librsvg
-has to actually measure the extents of every single element in the SVG
-document in that case. If you need to do this by hand, use
-[method@Rsvg.Handle.get_geometry_for_layer].
+SVG documents that have none of the `width`, `height`, or `viewBox` attributes are
+thankfully not very common, but they are hard to deal with: the software cannot
+immediately know their natural size or aspect ratio, so they cannot be easily scaled to
+fit within a viewport. If you need to measure the extents of all the objects in an SVG
+document, you can use [method@Rsvg.Handle.get_geometry_for_element] by passing `NULL` for
+the target element's `id`; this will measure all the elements in the document.
## Migrating to the geometry APIs