Beispiel #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);
    }
}
Beispiel #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);
    }
}
Beispiel #3
0
void
pdf__scale(PDF *p, pdc_scalar sx, pdc_scalar sy)
{
    pdc_matrix m;

    pdc_check_number_zero(p->pdc, "sx", sx);
    pdc_check_number_zero(p->pdc, "sy", sy);

    if (sx == 1 && sy == 1)
	return;

    pdc_scale_matrix(sx, sy, &m);

    pdf_concat_raw(p, &m);
}
Beispiel #4
0
PDFLIB_API void PDFLIB_CALL
PDF_scale(PDF *p, float sx, float sy)
{
    static const char fn[] = "PDF_scale";
    pdc_matrix m;

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

    if (sx == (float) 0)
	pdc_error(p->pdc, PDC_E_ILLARG_FLOAT, "sx", "0", 0, 0);

    if (sy == (float) 0)
	pdc_error(p->pdc, PDC_E_ILLARG_FLOAT, "sy", "0", 0, 0);

    if (sx == (float) 1 && sy == (float) 1)
	return;

    pdc_scale_matrix(sx, sy, &m);

    pdf_concat_raw(p, &m);
}