Exemplo n.º 1
0
// JEY TODO: Obsolete; replace with ACTIONS::zoomFitScreen
void EDA_DRAW_FRAME::Zoom_Automatique( bool aWarpPointer )
{
    BASE_SCREEN* screen = GetScreen();

    // Set the best zoom and get center point.

    // BestZoom() can compute an illegal zoom if the client window size
    // is small, say because frame is not maximized.  So use the clamping form
    // of SetZoom():
    double bestzoom = BestZoom();
    screen->SetScalingFactor( bestzoom );

    if( !screen->m_Initialized )
        SetCrossHairPosition( GetScrollCenterPosition() );

    m_toolManager->RunAction( "common.Control.zoomFitScreen", true );
}