mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-17 06:00:23 +01:00
Update documentation for cairo_get_scaled_font and cairo_get_font_face
There was some leftover cut-and-paste description of get_font_face in the documentation for get_scaled_font. That turned out to be a good thing as it alerted me to the fact that the get_font_face documentation was stale as well. Add description of the 'nil' object return values, rather than NULL.
This commit is contained in:
parent
5f386bb15a
commit
b0c086fce4
1 changed files with 23 additions and 9 deletions
32
src/cairo.c
32
src/cairo.c
|
|
@ -2429,10 +2429,17 @@ cairo_set_font_face (cairo_t *cr,
|
|||
*
|
||||
* Gets the current font face for a #cairo_t.
|
||||
*
|
||||
* Return value: the current font object. Can return %NULL
|
||||
* on out-of-memory or if the context is already in
|
||||
* an error state. This object is owned by cairo. To keep
|
||||
* a reference to it, you must call cairo_font_face_reference().
|
||||
* Return value: the current font face. This object is owned by
|
||||
* cairo. To keep a reference to it, you must call
|
||||
* cairo_font_face_reference.
|
||||
*
|
||||
* This function never returns %NULL. If memory cannot be allocated, a
|
||||
* special "nil" #cairo_font_face_t object will be returned on which
|
||||
* cairo_font_face_status() returns %CAIRO_STATUS_NO_MEMORY. Using
|
||||
* this nil object will cause its error state to propagate to other
|
||||
* objects it is passed to, (for example, calling
|
||||
* cairo_set_font_face() with a nil font will trigger an error that
|
||||
* will shutdown the cairo_t object).
|
||||
**/
|
||||
cairo_font_face_t *
|
||||
cairo_get_font_face (cairo_t *cr)
|
||||
|
|
@ -2599,12 +2606,19 @@ BAIL:
|
|||
* cairo_get_scaled_font:
|
||||
* @cr: a #cairo_t
|
||||
*
|
||||
* Gets the current font face for a #cairo_t.
|
||||
* Gets the current scaled font for a #cairo_t.
|
||||
*
|
||||
* Return value: the current font object. Can return %NULL
|
||||
* on out-of-memory or if the context is already in
|
||||
* an error state. This object is owned by cairo. To keep
|
||||
* a reference to it, you must call cairo_font_face_reference().
|
||||
* Return value: the current scaled font. This object is owned by
|
||||
* cairo. To keep a reference to it, you must call
|
||||
* cairo_scaled_font_reference().
|
||||
*
|
||||
* This function never returns %NULL. If memory cannot be allocated, a
|
||||
* special "nil" #cairo_scaled_font_t object will be returned on which
|
||||
* cairo_scaled_font_status() returns %CAIRO_STATUS_NO_MEMORY. Using
|
||||
* this nil object will cause its error state to propagate to other
|
||||
* objects it is passed to, (for example, calling
|
||||
* cairo_set_scaled_font() with a nil font will trigger an error that
|
||||
* will shutdown the cairo_t object).
|
||||
*
|
||||
* Since: 1.4
|
||||
**/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue