Logo Search packages:      
Sourcecode: inkscape version File versions  Download package

static pair<double, double> get_paper_size ( PaperSize const &  paper,
bool const   landscape,
SPUnit const *const   dest_unit 
) [static]

Returns paper dimensions using specific unit and orientation.

Definition at line 560 of file desktop-properties.cpp.

Referenced by sp_doc_dialog_paper_selected().

{
    double h, w;
    if (landscape) {
        w = paper.larger;
        h = paper.smaller;
    } else {
        w = paper.smaller;
        h = paper.larger;
    }
    SPUnit const &src_unit = sp_unit_get_by_id(paper.unit);
    sp_convert_distance(&w, &src_unit, dest_unit);
    sp_convert_distance(&h, &src_unit, dest_unit);
    return pair<double, double>(w, h);
}


Generated by  Doxygen 1.6.0   Back to index