[cairo] Const correctness?

Torbjörn Rathsman milasudril at gmail.com
Thu Feb 16 08:37:57 UTC 2017

Function retrieving image width:

int cairo_image_surface_get_width (cairo_surface_t *surface);

So, in what way does Cairo modify the surface when I ask for its width?

The same question applies to the other query methods of image surface. Is
this just a badly written prototype? That is, is the following safe:

auto w=cairo_image_surface_get_width(const_cast<cairo_surface_t*>(surface));
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cairographics.org/archives/cairo/attachments/20170216/32b6ab22/attachment.html>

More information about the cairo mailing list