Exemple #1
0
void
pdf_set_topdownsystem(PDF *p, float height)
{
    if (p->ydirection < (float) 0.0)
    {
        pdc_matrix m;
        pdc_translation_matrix(0, height, &m);
        pdf_concat_raw(p, &m);
        pdc_scale_matrix(1, -1, &m);
        pdf_concat_raw(p, &m);
        pdf_set_horiz_scaling(p, 100);
    }
}
Exemple #2
0
void
pdf_set_topdownsystem(PDF *p, pdc_scalar height)
{
    if (p->ydirection < 0)
    {
        pdc_matrix m, sm;

        pdc_translation_matrix(0, height, &m);
        pdc_scale_matrix(1, -1, &sm);
        pdc_multiply_matrix(&sm, &m);
        pdf_concat_raw(p, &m);
    }
}
Exemple #3
0
void
pdf__translate(PDF *p, pdc_scalar tx, pdc_scalar ty)
{
    pdc_matrix m;

    pdc_check_number(p->pdc, "tx", tx);
    pdc_check_number(p->pdc, "ty", ty);

    if (tx == 0 && ty == 0)
	return;

    pdc_translation_matrix(tx, ty, &m);

    pdf_concat_raw(p, &m);
}
Exemple #4
0
PDFLIB_API void PDFLIB_CALL
PDF_translate(PDF *p, float tx, float ty)
{
    static const char fn[] = "PDF_translate";
    pdc_matrix m;

    if (!pdf_enter_api(p, fn, pdf_state_content, "(p[%p], %g, %g)\n",
	(void *) p, tx, ty))
	return;

    if (tx == (float) 0 && ty == (float) 0)
	return;

    pdc_translation_matrix(tx, ty, &m);

    pdf_concat_raw(p, &m);
}