Logo Search packages:      
Sourcecode: inkscape version File versions

void SPDesktop::push_current_zoom ( GList **  history  )  [private]

Put current zoom data in history list.

Definition at line 602 of file desktop.cpp.

References get_display_area(), NR::Rect::max(), and NR::Rect::min().

Referenced by next_zoom(), prev_zoom(), and set_display_area().

{
    NR::Rect const area = get_display_area();

    NRRect *old_zoom = g_new(NRRect, 1);
    old_zoom->x0 = area.min()[NR::X];
    old_zoom->x1 = area.max()[NR::X];
    old_zoom->y0 = area.min()[NR::Y];
    old_zoom->y1 = area.max()[NR::Y];
    if ( *history == NULL
         || !( ( ((NRRect *) ((*history)->data))->x0 == old_zoom->x0 ) &&
               ( ((NRRect *) ((*history)->data))->x1 == old_zoom->x1 ) &&
               ( ((NRRect *) ((*history)->data))->y0 == old_zoom->y0 ) &&
               ( ((NRRect *) ((*history)->data))->y1 == old_zoom->y1 ) ) )
    {
        *history = g_list_prepend (*history, old_zoom);
    }
}


Generated by  Doxygen 1.6.0   Back to index