Re: [Bug 90166] Add a way to specify units (in SVG output)

Antonio Ospite <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
On Thu, 12 Oct 2017 12:25:41 +0200
Antonio Ospite <[email protected]> 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.
> 

Hi,

here is v2 of the path:
https://bugs.freedesktop.org/show_bug.cgi?id=90166#c11

After this is merged we can discuss if some extensions can be useful;
like getting an array of all the possible units, or having a function
to convert the enum values to strings, I mean following the model of 
cairo_svg_get_versions() and cairo_svg_version_to_string().

I was also thinking of tweaking the documentation of the functions which
create SVG surfaces to state that "width" and "height" are assumed to
be in points by *default*, but that their unit can be changed later.

Ciao,
   Antonio

-- 
Antonio Ospite
https://ao2.it
https://twitter.com/ao2it

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
-- 
cairo mailing list
[email protected]
https://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.