Reimplemented from OglGui::ZoomShiftRuler. Reimplemented in Impala::Application::MediaTable::UnixTimeLine. Definition at line 264 of file WindowTimeLine.h. References GetTimeUnits(), OglGui::OglWindow::mOglWnd, OglGui::ZoomShiftRuler::mTextColor, OglGui::ZoomShiftRuler::mTextShaded, OglGui::ZoomShiftRuler::mTextShadowBg, and OglGui::ZoomShiftRuler::mTextShadowFg. 00265 { 00266 DrawLine(x, y-tickLen, x, y); 00267 00268 int h,m,s,ms; 00269 GetTimeUnits(timeMs,h,m,s,ms); 00270 00271 std::string format = h ? "%02d:%02d:%02d" : "%02d:%02d"; 00272 00273 if (tickSpanMs <= 500 && tickSpanMs > 100){ 00274 format += ".%d"; 00275 ms /= 100; 00276 } 00277 if (tickSpanMs <= 100 && tickSpanMs > 10){ 00278 format += ".%02d"; 00279 ms /= 10; 00280 } 00281 if (tickSpanMs <= 10) 00282 format += ".%03d"; 00283 00284 char charBuf[256]; 00285 if (h) // hours 00286 sprintf(charBuf, format.c_str(), h, m, s, ms); 00287 else 00288 sprintf(charBuf, format.c_str(), m, s, ms); 00289 00290 int txtY = y - tickLen - 10; 00291 int txtX = x - ((x<15) ? 2 : 15); 00292 00293 if (!mTextShaded) 00294 oglSys.PosColPrintf(mOglWnd, txtX, txtY, mTextColor, charBuf); 00295 else 00296 oglSys.ShadowPrintf(mOglWnd, txtX, txtY, mTextShadowBg, 00297 mTextShadowFg, charBuf); 00298 }
Here is the call graph for this function:
|