/* reset all gstate parameters except CTM */ void pdf_reset_gstate(PDF *p) { pdf_gstate *gs = &p->curr_ppt->gstate[p->curr_ppt->sl]; pdf_set_default_color(p, pdc_true); pdf__setlinewidth(p, 1); pdf__setlinecap(p, 0); pdf__setlinejoin(p, 0); pdf__setmiterlimit(p, 10); pdf__setdash(p, 0, 0); if (gs->flatness != -1) pdf__setflat(p, 1); }
/* reset all gstate parameters except CTM */ void pdf_reset_gstate(PDF *p) { pdf_gstate *gs = &p->gstate[p->sl]; pdf__setcolor(p, "fillstroke", "gray", (float) 0, (float) 0, (float) 0, (float) 0); pdf__setlinewidth(p, 1); pdf__setlinecap(p, 0); pdf__setlinejoin(p, 0); pdf__setmiterlimit(p, 10); pdf__setdash(p, 0, 0); if (gs->flatness != (float) -1) pdf__setflat(p, (float) 1.0); }
PDFLIB_API void PDFLIB_CALL PDF_setdash(PDF *p, float b, float w) { static const char fn[] = "PDF_setdash"; if (!pdf_enter_api(p, fn, pdf_state_content, "(p[%p], %g, %g)\n", (void *) p, b, w)) return; if (b < (float) 0.0) pdc_error(p->pdc, PDC_E_ILLARG_FLOAT, "b", pdc_errprintf(p->pdc, "%f", b), 0, 0); if (w < (float) 0.0) pdc_error(p->pdc, PDC_E_ILLARG_FLOAT, "w", pdc_errprintf(p->pdc, "%f", w), 0, 0); pdf__setdash(p, b, w); }