mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2025-12-25 09:30:18 +01:00
Add more info to cairo_surface_set_mime_data docs.
Explains how to use cairo_surface_set_mime_data so that the image always gets used even if the MIME data cannot be. Signed-off-by: jimmyfrasche <soapboxcicero@gmail.com>
This commit is contained in:
parent
ead5c7909f
commit
2d89cbb30e
1 changed files with 10 additions and 0 deletions
|
|
@ -1293,6 +1293,16 @@ _cairo_mime_data_destroy (void *ptr)
|
|||
* discarded if you draw on the surface afterwards. Use this function
|
||||
* with care.
|
||||
*
|
||||
* Even if a backend supports a MIME type, that does not mean cairo
|
||||
* will always be able to use the attached MIME data. For example, if
|
||||
* the backend does not natively support the compositing operation used
|
||||
* to apply the MIME data to the backend. In that case, the MIME data
|
||||
* will be ignored. Therefore, to apply an image in all cases, it is best
|
||||
* to create an image surface which contains the decoded image data and
|
||||
* then attach the MIME data to that. This ensures the image will always
|
||||
* be used while still allowing the MIME data to be used whenever
|
||||
* possible.
|
||||
*
|
||||
* Return value: %CAIRO_STATUS_SUCCESS or %CAIRO_STATUS_NO_MEMORY if a
|
||||
* slot could not be allocated for the user data.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue