Logo Search packages:      
Sourcecode: inkscape version File versions

void SPDesktop::zoom_drawing (  ) 

Zoom to whole drawing.

Definition at line 876 of file desktop.cpp.

References NR::Rect::dimensions(), Inkscape::UI::View::View::doc(), and set_display_area().

Referenced by Inkscape::ZoomVerb::perform().

{
    g_return_if_fail (doc() != NULL);
    SPItem *docitem = SP_ITEM (sp_document_root (doc()));
    g_return_if_fail (docitem != NULL);

    NR::Rect d = sp_item_bbox_desktop(docitem);

    /* Note that the second condition here indicates that
    ** there are no items in the drawing.
    */
    if ( d.dimensions()[NR::X] < 1.0 || d.dimensions()[NR::Y] < 1.0 ) {
        return;
    }

    set_display_area(d, 10);
}


Generated by  Doxygen 1.6.0   Back to index