[cairo] [Bug 90166] Add a way to specify units
spitzak at gmail.com
Wed Oct 11 23:19:18 UTC 2017
Comment # 8 on bug 90166 from Adrian Johnson
The proposed api in this bug
https://bugs.freedesktop.org/show_bug.cgi?id=90166 uses an enumeration
for each of the svg unit types, but nothing is ever done with that
enumeration other than to print a 2-letter string into the svg output.
I propose a better api would be to just accept the string and print it
without any checking. This would remove the need to modify cairo on
any svg updates that add new units, and also probably makes it much
easier to copy the units from one svg to another.
void cairo_svg_surface_set_document_unit (cairo_surface_t*, const char*)
The string pointer must point at a valid svg unit type, such as "pt"
or "em". NULL is the same as "" (which means "user" units). The
function should do some basic sanity checks (maximum length, and only
printing ASCII) and is a no-op if it fails.
On Wed, Oct 11, 2017 at 1:45 PM, <bugzilla-daemon at freedesktop.org> wrote:
> Comment # 8 on bug 90166 from Adrian Johnson
> Please post API proposals to the mailing list for discussion.
> You are receiving this mail because:
> You are watching the QA Contact of the bug.
More information about the cairo