Exemplo n.º 1
0
Arquivo: madpdf.c Projeto: avm/madpdf
static void page_scale_get(double *hscale, double *vscale)
{
    ewl_pdf_scale_get(EWL_PDF(pdfwidget), hscale, vscale);
    switch(epdf_page_orientation_get(EWL_PDF(pdfwidget)->pdf_page)) {
            case EPDF_PAGE_ORIENTATION_LANDSCAPE:
            case EPDF_PAGE_ORIENTATION_SEASCAPE:
                SWAP(double, hscale, vscale);
    }
}
Exemplo n.º 2
0
void calculate_margins()
{
    int docwidth,docheight;
    double hscale,vscale;
    epdf_page_size_get (EWL_PDF(pdfwidget)->pdf_page,&docwidth,&docheight);
    ewl_pdf_scale_get(EWL_PDF(pdfwidget),&hscale,&vscale);
    leftmarge=((double)get_left_margin())/floor(((double)docwidth)*hscale);
    rightmarge=((double)get_right_margin())/floor(((double)docwidth)*hscale);
    fprintf(stderr,"%f %f",leftmarge,rightmarge);
}