third_party/cairo/src/cairo-pdf-operators.c
static cairo_status_t
_cairo_pdf_operators_set_text_position (cairo_pdf_operators_t  *pdf_operators,
					double 			x,
					double 			y)
{
    cairo_matrix_t translate, inverse;
    cairo_status_t status;

    /* The Td operator transforms the text_matrix with:
     *
     *   text_matrix' = T x text_matrix
     *
     * where T is a translation matrix with the translation components
     * set to the Td operands tx and ty.
     */
    inverse = pdf_operators->text_matrix;
    status = cairo_matrix_invert (&inverse);
    assert (status == CAIRO_STATUS_SUCCESS);
    pdf_operators->text_matrix.x0 = x;
    pdf_operators->text_matrix.y0 = y;
    cairo_matrix_multiply (&translate, &pdf_operators->text_matrix, &inverse);
    if (fabs(translate.x0) < TEXT_MATRIX_TOLERANCE)
	translate.x0 = 0.0;
    if (fabs(translate.y0) < TEXT_MATRIX_TOLERANCE)
	translate.y0 = 0.0;
    _cairo_output_stream_printf (pdf_operators->stream,
				 "%f %f Td\n",
				 translate.x0,
				 translate.y0);
    pdf_operators->cur_x = 0;
    pdf_operators->cur_y = 0;
    pdf_operators->glyph_buf_x_pos = 0;

    pdf_operators->cairo_to_pdftext = pdf_operators->text_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);
}
/* Set the translation components of the PDF text matrix to x, y. The
 * 'Td' operator is used to transform the text matrix.
 */
Set the translation components of the PDF text matrix to x, y. The
'Td' operator is used to transform the text matrix.
Set the translation components of the PDF text matrix to x y . The ' Td ' operator is used to transform the text matrix .
static cairo_status_t
_cairo_pdf_operators_set_text_position (cairo_pdf_operators_t  *pdf_operators,
					double 			x,
					double 			y)
{
    cairo_matrix_t translate, inverse;
    cairo_status_t status;
    inverse = pdf_operators->text_matrix;
    status = cairo_matrix_invert (&inverse);
    assert (status == CAIRO_STATUS_SUCCESS);
    pdf_operators->text_matrix.x0 = x;
    pdf_operators->text_matrix.y0 = y;
    cairo_matrix_multiply (&translate, &pdf_operators->text_matrix, &inverse);
    if (fabs(translate.x0) < TEXT_MATRIX_TOLERANCE)
	translate.x0 = 0.0;
    if (fabs(translate.y0) < TEXT_MATRIX_TOLERANCE)
	translate.y0 = 0.0;
    _cairo_output_stream_printf (pdf_operators->stream,
				 "%f %f Td\n",
				 translate.x0,
				 translate.y0);
    pdf_operators->cur_x = 0;
    pdf_operators->cur_y = 0;
    pdf_operators->glyph_buf_x_pos = 0;
    pdf_operators->cairo_to_pdftext = pdf_operators->text_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_position ( cairo_pdf_operators_t * pdf_operators , double x , double y ) { cairo_matrix_t translate , inverse ; cairo_status_t status ; inverse = pdf_operators -> text_matrix ; status = cairo_matrix_invert ( & inverse ) ; assert ( status == CAIRO_STATUS_SUCCESS ) ; pdf_operators -> text_matrix . x0 = x ; pdf_operators -> text_matrix . y0 = y ; cairo_matrix_multiply ( & translate , & pdf_operators -> text_matrix , & inverse ) ; if ( fabs ( translate . x0 ) < TEXT_MATRIX_TOLERANCE ) translate . x0 = 0.0 ; if ( fabs ( translate . y0 ) < TEXT_MATRIX_TOLERANCE ) translate . y0 = 0.0 ; _cairo_output_stream_printf ( pdf_operators -> stream , " \n " , translate . x0 , translate . y0 ) ; pdf_operators -> cur_x = 0 ; pdf_operators -> cur_y = 0 ; pdf_operators -> glyph_buf_x_pos = 0 ; pdf_operators -> cairo_to_pdftext = pdf_operators -> text_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 ) ; }
Set the translation components of the PDF text matrix to x, y.
Set the translation components of the PDF text matrix to x y .
/* The Td operator transforms the text_matrix with:
     *
     *   text_matrix' = T x text_matrix
     *
     * where T is a translation matrix with the translation components
     * set to the Td operands tx and ty.
     */