Add public API cairo_scaled_font_get_scale_matrix()

This commit is contained in:
Behdad Esfahbod 2008-05-24 20:33:15 -04:00
parent 90d62a0d33
commit c914377f35
4 changed files with 38 additions and 0 deletions

View file

@ -278,6 +278,7 @@ cairo_scaled_font_get_font_face
cairo_scaled_font_get_font_options
cairo_scaled_font_get_font_matrix
cairo_scaled_font_get_ctm
cairo_scaled_font_get_scale_matrix
cairo_scaled_font_get_type
cairo_scaled_font_get_reference_count
cairo_scaled_font_set_user_data

View file

@ -155,6 +155,15 @@ size and transformation and a certain set of font options.
@ctm:
<!-- ##### FUNCTION cairo_scaled_font_get_scale_matrix ##### -->
<para>
</para>
@scaled_font:
@scale_matrix:
<!-- ##### FUNCTION cairo_scaled_font_get_type ##### -->
<para>

View file

@ -1989,6 +1989,30 @@ cairo_scaled_font_get_ctm (cairo_scaled_font_t *scaled_font,
}
slim_hidden_def (cairo_scaled_font_get_ctm);
/**
* cairo_scaled_font_get_scale_matrix:
* @scaled_font: a #cairo_scaled_font_t
* @scale_matrix: return value for the matrix
*
* Stores the scale matrix of @scaled_font into @matrix.
* The scale matrix is product of the font matrix and the ctm
* associated with the scaled font, and hence is the matrix mapping from
* font space to device space.
*
* Since: 1.8
**/
void
cairo_scaled_font_get_scale_matrix (cairo_scaled_font_t *scaled_font,
cairo_matrix_t *scale_matrix)
{
if (scaled_font->status) {
cairo_matrix_init_identity (scale_matrix);
return;
}
*scale_matrix = scaled_font->scale;
}
/**
* cairo_scaled_font_get_font_options:
* @scaled_font: a #cairo_scaled_font_t

View file

@ -1275,6 +1275,10 @@ cairo_public void
cairo_scaled_font_get_ctm (cairo_scaled_font_t *scaled_font,
cairo_matrix_t *ctm);
cairo_public void
cairo_scaled_font_get_scale_matrix (cairo_scaled_font_t *scaled_font,
cairo_matrix_t *scale_matrix);
cairo_public void
cairo_scaled_font_get_font_options (cairo_scaled_font_t *scaled_font,
cairo_font_options_t *options);