[librsvg: 1/4] (#853): Fix incorrect suggestion in API docs about measuring geometries




commit 5e492c0fcb02f3589be6badbb35b4b9b019ec602
Author: Federico Mena Quintero <federico gnome org>
Date:   Wed Mar 16 10:43:20 2022 -0600

    (#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>

 doc/migrating.md | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/doc/migrating.md b/doc/migrating.md
index 962da59d2..84b83038f 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
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]