vlc_linux/vlc-3.0.16/modules/gui/qt/util/pictureflow.cpp
// adjust slides so that they are in "steady state" position
adjust slides so that they are in "steady state" position
adjust slides so that they are in " steady state " position
void PictureFlowState::reset()
{
    centerSlide.angle = 0;
    centerSlide.cx = 0;
    centerSlide.cy = 0;
    centerSlide.slideIndex = centerIndex;
    centerSlide.blend = 256;
    leftSlides.resize(6);
    for (int i = 0; i < (int)leftSlides.count(); i++) {
        SlideInfo& si = leftSlides[i];
        si.angle = angle;
        si.cx = -(offsetX + spacing * i * PFREAL_ONE);
        si.cy = offsetY;
        si.slideIndex = centerIndex - 1 - i;
        si.blend = 256;
        if (i == (int)leftSlides.count() - 2)
            si.blend = 128;
        if (i == (int)leftSlides.count() - 1)
            si.blend = 0;
    }
    rightSlides.resize(6);
    for (int i = 0; i < (int)rightSlides.count(); i++) {
        SlideInfo& si = rightSlides[i];
        si.angle = -angle;
        si.cx = offsetX + spacing * i * PFREAL_ONE;
        si.cy = offsetY;
        si.slideIndex = centerIndex + 1 + i;
        si.blend = 256;
        if (i == (int)rightSlides.count() - 2)
            si.blend = 128;
        if (i == (int)rightSlides.count() - 1)
            si.blend = 0;
    }
}
void PictureFlowState :: reset ( ) { centerSlide . angle = 0 ; centerSlide . cx = 0 ; centerSlide . cy = 0 ; centerSlide . slideIndex = centerIndex ; centerSlide . blend = 256 ; leftSlides . resize ( 6 ) ; for ( int i = 0 ; i < ( int ) leftSlides . count ( ) ; i ++ ) { SlideInfo & si = leftSlides [ i ] ; si . angle = angle ; si . cx = - ( offsetX + spacing * i * PFREAL_ONE ) ; si . cy = offsetY ; si . slideIndex = centerIndex - 1 - i ; si . blend = 256 ; if ( i == ( int ) leftSlides . count ( ) - 2 ) si . blend = 128 ; if ( i == ( int ) leftSlides . count ( ) - 1 ) si . blend = 0 ; } rightSlides . resize ( 6 ) ; for ( int i = 0 ; i < ( int ) rightSlides . count ( ) ; i ++ ) { SlideInfo & si = rightSlides [ i ] ; si . angle = - angle ; si . cx = offsetX + spacing * i * PFREAL_ONE ; si . cy = offsetY ; si . slideIndex = centerIndex + 1 + i ; si . blend = 256 ; if ( i == ( int ) rightSlides . count ( ) - 2 ) si . blend = 128 ; if ( i == ( int ) rightSlides . count ( ) - 1 ) si . blend = 0 ; } }
adjust slides so that they are in "steady state" position
adjust slides so that they are in " steady state " position