Reimplemented from OglGui::Window. Definition at line 249 of file TimeLineViewStrip.h. References FirstVisibleFrame(), OglGui::Window::InitDisplayFunc(), Impala::Core::Stream::RgbDataSrc::LastFrame(), LastVisibleFrame(), mBothMpg, mCurrentViewOnTop, mFrameError, mMinViewW, mOldSpace, mOldStartFrame, mRgbDataSrc, mShow, mViewers, mViewFrameStep, ShowCurrentViewOnTop(), OglGui::ZoomShiftRuler::Unit2Pixel(), ViewStripClearView(), ViewStripClearViews(), ViewStripCopyImageFromView(), ViewStripCreateImage(), ViewStripFindIndex(), ViewStripFindIndexBwd(), and ViewStripNewPositionNeedsIm(). 00250 { 00251 WindowTimeLine::InitDisplayFunc(); 00252 if (!mShow || !mRgbDataSrc) 00253 return; 00254 00255 int space = Unit2Pixel(mViewFrameStep*40)-Unit2Pixel(0); 00256 if (space < mMinViewW && mOldSpace >= mMinViewW) 00257 ViewStripClearViews(0, mViewers.size()); 00258 00259 if ((mOldSpace = space) < mMinViewW) 00260 { 00261 if (mCurrentViewOnTop==2) 00262 ShowCurrentViewOnTop(); 00263 else 00264 ViewStripClearView(mViewers.size()-1); 00265 mOldStartFrame = -1; 00266 return; 00267 } 00268 00269 int err = mBothMpg ? 1 : mFrameError; 00270 00271 int startFrame = FirstVisibleFrame()+err-mViewFrameStep; 00272 if (startFrame < 0) 00273 startFrame = 0; 00274 int endFrame = LastVisibleFrame()+err+mViewFrameStep; 00275 if (endFrame > mRgbDataSrc->LastFrame()) 00276 endFrame = mRgbDataSrc->LastFrame(); 00277 int range = endFrame-startFrame-1; 00278 00279 if (range/mViewFrameStep >= mViewers.size()) 00280 range = (mViewers.size()*mViewFrameStep)-1; 00281 00282 int i, idx, frameNr, vCnt; 00283 if (mOldStartFrame <= startFrame) 00284 { 00285 for (i=0, vCnt=-1; i <= range; i++) 00286 { 00287 if ((frameNr = i+startFrame) % mViewFrameStep) 00288 continue; 00289 if (!ViewStripNewPositionNeedsIm(++vCnt, frameNr, space)) 00290 continue; 00291 if ((idx = ViewStripFindIndex(frameNr,vCnt))!=-1) 00292 ViewStripCopyImageFromView(vCnt,idx,frameNr); 00293 else 00294 ViewStripCreateImage(vCnt,frameNr); 00295 } 00296 ViewStripClearViews(vCnt+1, mViewers.size()); 00297 } 00298 else 00299 { 00300 for (vCnt=0,i=range; i>=0; i--) 00301 if (!((i+startFrame) % mViewFrameStep)) 00302 vCnt++; 00303 if (!vCnt) return; 00304 int lastV = vCnt; 00305 for (i=range; i>=0; i--) 00306 { 00307 if ((frameNr = i+startFrame) % mViewFrameStep) 00308 continue; 00309 if (!ViewStripNewPositionNeedsIm(--vCnt, frameNr, space)) 00310 continue; 00311 if ((idx = ViewStripFindIndexBwd(frameNr,vCnt))!=-1) 00312 ViewStripCopyImageFromView(vCnt,idx,frameNr); 00313 else 00314 ViewStripCreateImage(vCnt,frameNr); 00315 } 00316 ViewStripClearViews(lastV, mViewers.size()); 00317 } 00318 00319 if (mCurrentViewOnTop) 00320 ShowCurrentViewOnTop(); 00321 00322 mOldStartFrame = startFrame; 00323 }
Here is the call graph for this function:
|