Exemplo n.º 1
0
void CTimeAxis::OnPaint()
{
	CPaintDC dc(this); // device context for painting

	// 不为绘图消息调用 CStatic::OnPaint()

	drawBackground(&dc);
	drawTimeLine(&dc);
	drawTimePoints(&dc);
	drawTimePtSel(&dc);
	drawCurTime(&dc);
	drawTimeBrev(&dc);

// 	if (0 != m_pMemDC)
// 	{
// 		PatBlt(m_pMemDC->m_hDC, 0, 0, m_dw, m_dh, BLACKNESS);
// 
// 		drawBackground(m_pMemDC);
// 		drawTimeLine(m_pMemDC);
// 		drawTimePoints(m_pMemDC);
// 		drawTimePtSel(m_pMemDC);
// 		drawCurTime(m_pMemDC);
// 		drawTimeBrev(m_pMemDC);
// 
// 		dc.BitBlt(0, 0, m_dw, m_dh, m_pMemDC, 0, 0, SRCCOPY);
// 	}
}
Exemplo n.º 2
0
void Timeline::render(Track* track)
{
	CCSize * timeLineSize=new CCSize(CCDirector::sharedDirector()->getVisibleSize().width,CCDirector::sharedDirector()->getVisibleSize().height/20);
	CCPoint *timelineTrackRatio=new CCPoint(getTimelineTrackRatio(track,timeLineSize));
	float * addtionalDistance=new float(getDistanceFrom(track));
	drawTimeLine(track,timeLineSize);
	drawTBars(track,timelineTrackRatio,timeLineSize,addtionalDistance);
	drawTItems(track,timelineTrackRatio,timeLineSize,addtionalDistance);
	drawTPlayer(track,timelineTrackRatio,timeLineSize,addtionalDistance);
	ccDrawColor4F(0xFF,0xFF,0xFF,0xFF);
	glLineWidth(1.0f);
}