[cairo] Question about create_from_png
Matt Rice
ratmice at gmail.com
Tue Mar 30 19:33:25 PDT 2010
On Tue, Mar 30, 2010 at 6:52 PM, silverburgh
<silverburgh.meryl at gmail.com> wrote:
> Hi,
>
> I have a question about create_from_png () which documented here:
> http://www.cairographics.org/documentation/cairomm/reference/classCairo_1_1ImageSurface.html#ac35bcd255347574036746810f8a2978
>
>
> static RefPtr<ImageSurface>
> Cairo::ImageSurface::create_from_png ( std::string filename )
> [static]
>
>
> If I put a filename say 'test.png', how does Cairo resolve the file
> name to find the absolute path of the file?
It doesn't appear that it does anywhere,
filename just gets passed directly to the fopen function of libc which
may have some semantics based on the current working directory if
filename is not an absolute path.
fopen doesn't really describe what is and isn't a valid pathname, or
how it should be interpreted
http://www.opengroup.org/onlinepubs/009695399/functions/fopen.html
so I guess the answer is that it doesn't, it only knows whether or not
the operation was successful in that it was able to extract some png
data from the filename given.
More information about the cairo
mailing list