Implementation of rsvg_bbox_render_path
Hagen Schink <[email protected]>
| Newsgroups | gmane.comp.gnome.lib.librsvg.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, I came across a small problem while implementing the feature request for the function rsvg_handle_get_dimensions_sub() (bug 555682). While I tested the function I noticed that it returns false dimension data for path elements. I guess it's because rsvg_bbox_render_path() (rsvg-base.c line 1212 and the following) doesn't implement a proper handling for curves. I'd like to discuss possible solutions for this problem. I have two possible solutions in mind but maybe there are other and/or better ones. (1) Use a mathematical approach which means compute the height of the curve (Bézier curve) and implement the case for RSVG_CURVETO. I didn't find any formulas in the web so I tried to make my own computations so far. Other ideas or links are appreciated. :-) (2) Draw the curve via Cairo and take the bounding box from there. Hagen ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/