void TacticsInstrument_AppTrueWindAngle::Draw(wxGCDC* bdc) { wxColour c1; GetGlobalColor(_T("DASHB"), &c1); wxBrush b1(c1); bdc->SetBackground(b1); bdc->Clear(); wxSize size = GetClientSize(); m_cx = size.x / 2; int availableHeight = size.y - m_TitleHeight - 6; int width, height; bdc->GetTextExtent(_T("000"), &width, &height, 0, 0, g_pFontLabel); m_cy = m_TitleHeight + 2; m_cy += availableHeight / 2; m_radius = availableHeight / 2.0 * 0.95; DrawLabels(bdc); DrawFrame(bdc); DrawMarkers(bdc); DrawBackground(bdc); DrawData(bdc, m_MainValueApp, m_MainValueAppUnit, m_MainValueFormat, m_MainValueOption1); DrawData(bdc, m_MainValueTrue, m_MainValueTrueUnit, m_MainValueFormat, m_MainValueOption2); DrawData(bdc, m_ExtraValueApp, m_ExtraValueAppUnit, m_ExtraValueFormat, m_ExtraValueOption1); DrawData(bdc, m_ExtraValueTrue, m_ExtraValueTrueUnit, m_ExtraValueFormat, m_ExtraValueOption2); DrawData(bdc, m_TWD, m_MainValueTrueUnit, _T("TWD:%.0f"), DIAL_POSITION_INSIDE); DrawForeground(bdc); }
void DashboardInstrument_Dial::Draw(wxGCDC* bdc) { wxColour c1; GetGlobalColor(_T("DASHB"), &c1); wxBrush b1(c1); bdc->SetBackground(b1); bdc->Clear(); wxSize size = GetClientSize(); m_cx = size.x / 2; int availableHeight = size.y - m_TitleHeight - 6; int width, height; bdc->GetTextExtent( _T("000"), &width, &height, 0, 0, g_pFontLabel ); m_cy = m_TitleHeight + 2; m_cy += availableHeight / 2; m_radius = availableHeight / 2; DrawLabels(bdc); DrawFrame(bdc); DrawMarkers(bdc); DrawBackground(bdc); DrawData(bdc, m_MainValue, m_MainValueUnit, m_MainValueFormat, m_MainValueOption); DrawData(bdc, m_ExtraValue, m_ExtraValueUnit, m_ExtraValueFormat, m_ExtraValueOption); DrawForeground(bdc); }
// ----------------------------------------------------------------------------- // Override QWidget. // ----------------------------------------------------------------------------- void ReRulerWidget::paintEvent( QPaintEvent* _event ) { QPainter painter( this ); DrawBackground( painter ); DrawMarks( painter ); DrawForeground( painter ); }
void DashboardInstrument_BaroHistory::Draw(wxGCDC* dc) { m_WindowRect = GetClientRect(); m_DrawAreaRect=GetClientRect(); m_DrawAreaRect.SetHeight(m_WindowRect.height-m_TopLineHeight-m_TitleHeight); m_DrawAreaRect.SetX (m_LeftLegend+3); DrawBackground(dc); DrawForeground(dc); }
void TacticsInstrument_WindDirHistory::Draw(wxGCDC* dc) { m_WindowRect = GetClientRect(); m_DrawAreaRect = GetClientRect(); m_DrawAreaRect.SetHeight(m_WindowRect.height - m_TopLineHeight - m_TitleHeight); m_DrawAreaRect.SetX(m_LeftLegend + 3); // wxLogMessage("WindHist: m_WindowRect.height=%d,m_DrawAreaRect.height=%d,m_TopLineHeight=%d,m_TitleHeight=%d", m_WindowRect.height, m_DrawAreaRect.height, m_TopLineHeight, m_TitleHeight); DrawBackground(dc); DrawForeground(dc); }
void pawsLoadWindow::Draw() { if(DrawWindow()) { if(renderAnim) { DrawAnim(); } DrawForeground(); } }
// TODO void Game::DrawGraphics() { //graphics.BeginFrame(); std::map<std::pair<int, int>, Entity*>* entitites = level->getEntities(); DrawBackground(); for (std::map<std::pair<int, int>, Entity*>::iterator i = entitites->begin(); i != entitites->end(); i++) { Entity* entity = i->second; Spikes* spikes = dynamic_cast<Spikes*>(entity); if (spikes != NULL && level->inScene(i->first.second, i->first.first)) { spikes->AnimateBackground(&graphics); } else { //i->second->Animate(NULL); } } if (DEBUG) { graphics.DrawCircle(prince->getMidX(), prince->getMidY(), 5, 255, 255, 255); } if (DEBUG) { graphics.DrawCircle(prince->getX(), prince->getY(), 5, 255, 255, 255); } for (std::map<std::pair<int, int>, Entity*>::iterator i = entitites->begin(); i != entitites->end(); i++) { if (i->second == NULL) { continue; } // TODO: should not happen check load entities if (i->second->getType() == spikeT || i->second->getType() == platformT) { continue; } if (level->inScene(i->first.second, i->first.first)) { i->second->Animate(&graphics); } else { i->second->Animate(NULL); } } prince->Animate(&graphics); DrawForeground(); for (std::map<std::pair<int, int>, Entity*>::iterator i = entitites->begin(); i != entitites->end(); i++) { Entity* entity = i->second; Spikes* spikes = dynamic_cast<Spikes*>(entity); if (spikes != NULL && level->inScene(i->first.second, i->first.first)) { spikes->AnimateForeground(&graphics); } else { //i->second->Animate(NULL); } } DrawHealth(); //graphics.EndFrame(); }
void TacticsInstrument_BearingCompass::Draw(wxGCDC* bdc) { wxColour c1; GetGlobalColor(_T("DASHB"), &c1); wxBrush b1(c1); bdc->SetBackground(b1); bdc->Clear(); wxSize size = GetClientSize(); m_cx = size.x / 2; int availableHeight = size.y - m_TitleHeight - 6; int width, height; bdc->GetTextExtent(_T("000"), &width, &height, 0, 0, g_pFontLabel); m_cy = m_TitleHeight + 2; m_cy += availableHeight / 2; m_radius = availableHeight / 2 *0.80; DrawLabels(bdc); DrawFrame(bdc); DrawMarkers(bdc); DrawBackground(bdc); if (!wxIsNaN(m_Bearing)){ DrawData(bdc, m_Bearing, m_BearingUnit, _T("BRG:%.f"), DIAL_POSITION_TOPLEFT); DrawData(bdc, 0, m_ToWpt, _T(""), DIAL_POSITION_TOPRIGHT); } if (!wxIsNaN(m_CurrSpeed)) DrawData(bdc, m_CurrSpeed, m_CurrSpeedUnit, _T("Curr:%.2f"), DIAL_POSITION_INSIDE); if (!wxIsNaN(m_ExtraValueDTW)) DrawData(bdc, m_ExtraValueDTW, m_ExtraValueDTWUnit, _T("DTW:%.1f"), DIAL_POSITION_BOTTOMLEFT); if (!wxIsNaN(m_CurrDir) && m_CurrDir >= 0 && m_CurrDir < 360) DrawCurrent(bdc); DrawForeground(bdc); DrawLaylines(bdc); if (!wxIsNaN(m_MainValue)) DrawData(bdc, m_MainValue, m_MainValueUnit, _T("%.0f"), DIAL_POSITION_TOPINSIDE); if (!wxIsNaN(m_predictedSog)) DrawData(bdc, m_predictedSog, getUsrSpeedUnit_Plugin(g_iDashSpeedUnit), _T("prd.SOG: ~%.1f"), DIAL_POSITION_BOTTOMRIGHT); }
void CDistrictRelationTable::DrawNormal(Display::IDisplayPtr pDisplay) { //重新计算geometry大小 RecalcGeometry( pDisplay ); //重新计算单元格的宽度和高度 Scale( pDisplay ); //绘制背景 DrawBackground( pDisplay ); //绘制表格线 DrawTableLines( pDisplay ); //绘制缩略图 DrawBrevaryPic( pDisplay ); //绘制接边表的内容 DrawRelationDistrict( pDisplay ); //绘制前景 DrawForeground( pDisplay ); }
void DashboardInstrument_Depth::Draw(wxBufferedDC* dc) { DrawBackground(dc); DrawForeground(dc); }
void CSkinItemSlider::Draw(CDC* pDC, LPRECT lpInvalidRect, CRgn* pInvalidRgn) { DrawBackground(pDC, lpInvalidRect, pInvalidRgn); DrawForeground(pDC, lpInvalidRect, pInvalidRgn); DrawFrame(pDC, lpInvalidRect, pInvalidRgn); }
void DashboardInstrument_GPS::Draw(wxBufferedDC* dc) { DrawFrame(dc); DrawBackground(dc); DrawForeground(dc); }
void EngineRunningBase::Draw() { DrawBackground(); DrawForeground(); }