[cairo] Question about create_from_png
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:
> I have a question about create_from_png () which documented here:
> static RefPtr<ImageSurface>
> Cairo::ImageSurface::create_from_png ( std::string filename )
> 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
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