third_party/cairo/src/cairo-pdf-operators.c
static cairo_status_t
_cairo_pdf_operators_set_text_matrix (cairo_pdf_operators_t  *pdf_operators,
				      cairo_matrix_t         *matrix)
{
    cairo_matrix_t inverse;
    cairo_status_t status;

    /* We require the matrix to be invertable. */
    inverse = *matrix;
    status = cairo_matrix_invert (&inverse);
    if (unlikely (status))
	return status;

    pdf_operators->text_matrix = *matrix;
    pdf_operators->cur_x = 0;
    pdf_operators->cur_y = 0;
    pdf_operators->glyph_buf_x_pos = 0;
    _cairo_output_stream_print_matrix (pdf_operators->stream, &pdf_operators->text_matrix);
    _cairo_output_stream_printf (pdf_operators->stream, " Tm\n");

    pdf_operators->cairo_to_pdftext = *matrix;
    status = cairo_matrix_invert (&pdf_operators->cairo_to_pdftext);
    assert (status == CAIRO_STATUS_SUCCESS);
    cairo_matrix_multiply (&pdf_operators->cairo_to_pdftext,
			   &pdf_operators->cairo_to_pdf,
			   &pdf_operators->cairo_to_pdftext);

    return _cairo_output_stream_get_status (pdf_operators->stream);
}
/* Use 'Tm' operator to set the PDF text matrix. */
Use 'Tm' operator to set the PDF text matrix.
Use ' Tm ' operator to set the PDF text matrix .
static cairo_status_t
_cairo_pdf_operators_set_text_matrix (cairo_pdf_operators_t  *pdf_operators,
				      cairo_matrix_t         *matrix)
{
    cairo_matrix_t inverse;
    cairo_status_t status;
    inverse = *matrix;
    status = cairo_matrix_invert (&inverse);
    if (unlikely (status))
	return status;
    pdf_operators->text_matrix = *matrix;
    pdf_operators->cur_x = 0;
    pdf_operators->cur_y = 0;
    pdf_operators->glyph_buf_x_pos = 0;
    _cairo_output_stream_print_matrix (pdf_operators->stream, &pdf_operators->text_matrix);
    _cairo_output_stream_printf (pdf_operators->stream, " Tm\n");
    pdf_operators->cairo_to_pdftext = *matrix;
    status = cairo_matrix_invert (&pdf_operators->cairo_to_pdftext);
    assert (status == CAIRO_STATUS_SUCCESS);
    cairo_matrix_multiply (&pdf_operators->cairo_to_pdftext,
			   &pdf_operators->cairo_to_pdf,
			   &pdf_operators->cairo_to_pdftext);
    return _cairo_output_stream_get_status (pdf_operators->stream);
}
static cairo_status_t _cairo_pdf_operators_set_text_matrix ( cairo_pdf_operators_t * pdf_operators , cairo_matrix_t * matrix ) { cairo_matrix_t inverse ; cairo_status_t status ; inverse = * matrix ; status = cairo_matrix_invert ( & inverse ) ; if ( unlikely ( status ) ) return status ; pdf_operators -> text_matrix = * matrix ; pdf_operators -> cur_x = 0 ; pdf_operators -> cur_y = 0 ; pdf_operators -> glyph_buf_x_pos = 0 ; _cairo_output_stream_print_matrix ( pdf_operators -> stream , & pdf_operators -> text_matrix ) ; _cairo_output_stream_printf ( pdf_operators -> stream , " \n " ) ; pdf_operators -> cairo_to_pdftext = * matrix ; status = cairo_matrix_invert ( & pdf_operators -> cairo_to_pdftext ) ; assert ( status == CAIRO_STATUS_SUCCESS ) ; cairo_matrix_multiply ( & pdf_operators -> cairo_to_pdftext , & pdf_operators -> cairo_to_pdf , & pdf_operators -> cairo_to_pdftext ) ; return _cairo_output_stream_get_status ( pdf_operators -> stream ) ; }
Use 'Tm' operator to set the PDF text matrix.
Use ' Tm ' operator to set the PDF text matrix .
/* We require the matrix to be invertable. */