Re: [Bug 90166] Add a way to specify units (in SVG output)
Adrian Johnson <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <[email protected]> |
On 12/10/17 20:55, Antonio Ospite wrote:
> The API addition I originally proposed[1,2] looks like this:
>
> void cairo_svg_surface_set_document_unit (cairo_surface_t*, cairo_svg_unit_t)
>
> Where cairo_svg_unit_t is an enum type representing all the possible
> units.
The enum in the patch is:
typedef enum _cairo_svg_unit {
CAIRO_SVG_UNIT_EM,
CAIRO_SVG_UNIT_EX,
CAIRO_SVG_UNIT_PX,
CAIRO_SVG_UNIT_IN,
CAIRO_SVG_UNIT_CM,
CAIRO_SVG_UNIT_MM,
CAIRO_SVG_UNIT_PT,
CAIRO_SVG_UNIT_PC,
CAIRO_SVG_UNIT_PERCENT,
CAIRO_SVG_UNIT_USER
} cairo_svg_unit_t;
This looks good to me. It just needs a getter. Are all the units in SVG
1.1? If not the minimum version will need to be documented. The default
unit will also need to be documented.
--
cairo mailing list
[email protected]
https://lists.cairographics.org/mailman/listinfo/cairo