这篇教程C++ wxRound函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中wxRound函数的典型用法代码示例。如果您正苦于以下问题:C++ wxRound函数的具体用法?C++ wxRound怎么用?C++ wxRound使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了wxRound函数的22个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: GetDoublePixFromLL// TODO: eliminate the use of this functionwxPoint ViewPort::GetPixFromLL( double lat, double lon ){ wxPoint2DDouble p = GetDoublePixFromLL(lat, lon); if(wxIsNaN(p.m_x) || wxIsNaN(p.m_y)) return wxPoint(INVALID_COORD, INVALID_COORD); return wxPoint(wxRound(p.m_x), wxRound(p.m_y));}
开发者ID:cagscat,项目名称:OpenCPN,代码行数:8,
示例2: GetSizevoid BITMAP_BASE::DrawBitmap( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPos ){ if( m_bitmap == NULL ) return; wxPoint pos = aPos; wxSize size = GetSize(); // To draw the bitmap, pos is the upper left corner position pos.x -= size.x / 2; pos.y -= size.y / 2; double scale; int logicalOriginX, logicalOriginY; aDC->GetUserScale( &scale, &scale ); aDC->GetLogicalOrigin( &logicalOriginX, &logicalOriginY ); aDC->SetUserScale( scale * GetScalingFactor(), scale * GetScalingFactor() ); aDC->SetLogicalOrigin( logicalOriginX / GetScalingFactor(), logicalOriginY / GetScalingFactor() ); aDC->DrawBitmap( *m_bitmap, wxRound( pos.x / GetScalingFactor() ), wxRound( pos.y / GetScalingFactor() ), true ); aDC->SetUserScale( scale, scale ); aDC->SetLogicalOrigin( logicalOriginX, logicalOriginY );}
开发者ID:hellamps,项目名称:kicad,代码行数:26,
示例3: wxASSERTvoid wxGCDCImpl::DoDrawPolyPolygon(int n, const int count[], const wxPoint points[], wxCoord xoffset, wxCoord yoffset, wxPolygonFillMode fillStyle){ wxASSERT(n > 1); wxGraphicsPath path = m_graphicContext->CreatePath(); int i = 0; for ( int j = 0; j < n; ++j) { wxPoint start = points[i]; path.MoveToPoint( start.x+ xoffset, start.y+ yoffset); ++i; int l = count[j]; for ( int k = 1; k < l; ++k) { path.AddLineToPoint( points[i].x+ xoffset, points[i].y+ yoffset); ++i; } // close the polygon if ( start != points[i-1]) path.AddLineToPoint( start.x+ xoffset, start.y+ yoffset); } m_graphicContext->DrawPath( path , fillStyle); wxRect2DDouble box = path.GetBox(); CalcBoundingBox(wxRound(box.m_x), wxRound(box.m_y)); CalcBoundingBox(wxRound(box.m_x + box.m_width), wxRound(box.m_y + box.m_height));}
开发者ID:animecomico,项目名称:wxWidgets,代码行数:33,
示例4: iter// Deduce m_FromFrequency from the samples at the beginning of// the selection. Then set some other params accordingly.void EffectChangePitch::DeduceFrequencies(){ // As a neat trick, attempt to get the frequency of the note at the // beginning of the selection. SelectedTrackListOfKindIterator iter(Track::Wave, inputTracks()); WaveTrack *track = (WaveTrack *) iter.First(); if (track) { double rate = track->GetRate(); // Auto-size window -- high sample rates require larger windowSize. // Aim for around 2048 samples at 44.1 kHz (good down to about 100 Hz). // To detect single notes, analysis period should be about 0.2 seconds. // windowSize must be a power of 2. const size_t windowSize = // windowSize < 256 too inaccurate std::max(256, wxRound(pow(2.0, floor((log(rate / 20.0)/log(2.0)) + 0.5)))); // we want about 0.2 seconds to catch the first note. // number of windows rounded to nearest integer >= 1. const unsigned numWindows = std::max(1, wxRound((double)(rate / (5.0f * windowSize)))); double trackStart = track->GetStartTime(); double t0 = mT0 < trackStart? trackStart: mT0; auto start = track->TimeToLongSamples(t0); auto analyzeSize = windowSize * numWindows; Floats buffer{ analyzeSize }; Floats freq{ windowSize / 2 }; Floats freqa{ windowSize / 2, true }; track->Get((samplePtr) buffer.get(), floatSample, start, analyzeSize); for(unsigned i = 0; i < numWindows; i++) { ComputeSpectrum(buffer.get() + i * windowSize, windowSize, windowSize, rate, freq.get(), true); for(size_t j = 0; j < windowSize / 2; j++) freqa[j] += freq[j]; } size_t argmax = 0; for(size_t j = 1; j < windowSize / 2; j++) if (freqa[j] > freqa[argmax]) argmax = j; auto lag = (windowSize / 2 - 1) - argmax; m_dStartFrequency = rate / lag; } double dFromMIDInote = FreqToMIDInote(m_dStartFrequency); double dToMIDInote = dFromMIDInote + m_dSemitonesChange; m_nFromPitch = PitchIndex(dFromMIDInote); m_nFromOctave = PitchOctave(dFromMIDInote); m_nToPitch = PitchIndex(dToMIDInote); m_nToOctave = PitchOctave(dToMIDInote); m_FromFrequency = m_dStartFrequency; Calc_PercentChange(); Calc_ToFrequency();}
开发者ID:MindFy,项目名称:audacity,代码行数:61,
示例5: DoGetSizeMMvoid wxSVGFileDCImpl::DoGetSizeMM( int *width, int *height ) const{ if (width) *width = wxRound( (double)m_width / m_mm_to_pix_x ); if (height) *height = wxRound( (double)m_height / m_mm_to_pix_y );}
开发者ID:Jasonudoo,项目名称:wxWidgets,代码行数:8,
示例6: wxCHECK_RETvoid wxGCDCImpl::DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle){ wxCHECK_RET( IsOk(), wxT("wxGCDC(cg)::DoDrawRotatedText - invalid DC") ); if ( text.empty() ) return; if ( !m_logicalFunctionSupported ) return; // we test that we have some font because otherwise we should still use the // "else" part below to avoid that DrawRotatedText(angle = 180) and // DrawRotatedText(angle = 0) use different fonts (we can't use the default // font for drawing rotated fonts unfortunately) if ( (angle == 0.0) && m_font.IsOk() ) { DoDrawText(text, x, y); // Bounding box already updated by DoDrawText(), no need to do it again. return; } // Get extent of whole text. wxCoord w, h, heightLine; GetOwner()->GetMultiLineTextExtent(text, &w, &h, &heightLine); // Compute the shift for the origin of the next line. const double rad = wxDegToRad(angle); const double dx = heightLine * sin(rad); const double dy = heightLine * cos(rad); // Draw all text line by line const wxArrayString lines = wxSplit(text, '/n', '/0'); for ( size_t lineNum = 0; lineNum < lines.size(); lineNum++ ) { // Calculate origin for each line to avoid accumulation of // rounding errors. if ( m_backgroundMode == wxTRANSPARENT ) m_graphicContext->DrawText( lines[lineNum], x + wxRound(lineNum*dx), y + wxRound(lineNum*dy), wxDegToRad(angle )); else m_graphicContext->DrawText( lines[lineNum], x + wxRound(lineNum*dx), y + wxRound(lineNum*dy), wxDegToRad(angle ), m_graphicContext->CreateBrush(m_textBackgroundColour) ); } // call the bounding box by adding all four vertices of the rectangle // containing the text to it (simpler and probably not slower than // determining which of them is really topmost/leftmost/...) // "upper left" and "upper right" CalcBoundingBox(x, y); CalcBoundingBox(x + wxCoord(w*cos(rad)), y - wxCoord(w*sin(rad))); // "bottom left" and "bottom right" x += (wxCoord)(h*sin(rad)); y += (wxCoord)(h*cos(rad)); CalcBoundingBox(x, y); CalcBoundingBox(x + wxCoord(w*cos(rad)), y - wxCoord(w*sin(rad)));}
开发者ID:animecomico,项目名称:wxWidgets,代码行数:57,
示例7: wxGetDisplaySizeMMwxSize wxGetDisplaySizeMM(){ const wxSize ppi = wxGetDisplayPPI(); if ( !ppi.x || !ppi.y ) return wxSize(0, 0); const wxSize pixels = wxGetDisplaySize(); return wxSize(wxRound(pixels.x * inches2mm / ppi.x), wxRound(pixels.y * inches2mm / ppi.y));}
开发者ID:CodeSmithyIDE,项目名称:wxWidgets,代码行数:10,
示例8: GetScalingFactorwxPoint BASE_SCREEN::GetCrossHairScreenPosition() const{ wxPoint pos = m_crossHairPosition - m_DrawOrg; double scalar = GetScalingFactor(); pos.x = wxRound( (double) pos.x * scalar ); pos.y = wxRound( (double) pos.y * scalar ); return pos;}
开发者ID:hellamps,项目名称:kicad,代码行数:10,
示例9: WXUNUSEDvoid wxGenericStaticBitmap::OnPaint(wxPaintEvent& WXUNUSED(event)){ if ( !m_bitmap.IsOk() ) return; wxPaintDC dc(this); const wxSize drawSize = GetClientSize(); const wxSize bmpSize = m_bitmap.GetSize(); wxDouble w = 0; wxDouble h = 0; switch ( m_scaleMode ) { case Scale_None: dc.DrawBitmap(m_bitmap, 0, 0, true); return; case Scale_Fill: w = drawSize.x; h = drawSize.y; break; case Scale_AspectFill: case Scale_AspectFit: { wxDouble scaleFactor; wxDouble scaleX = (wxDouble)drawSize.x / (wxDouble)bmpSize.x; wxDouble scaleY = (wxDouble)drawSize.y / (wxDouble)bmpSize.y; if ( ( m_scaleMode == Scale_AspectFit && scaleY < scaleX ) || ( m_scaleMode == Scale_AspectFill && scaleY > scaleX ) ) scaleFactor = scaleY; else scaleFactor = scaleX; w = bmpSize.x * scaleFactor; h = bmpSize.y * scaleFactor; break; } } wxASSERT_MSG(w, wxS("Unknown scale mode")); wxDouble x = (drawSize.x - w) / 2; wxDouble y = (drawSize.y - h) / 2;#if wxUSE_GRAPHICS_CONTEXT wxScopedPtr<wxGraphicsContext> const gc(wxGraphicsRenderer::GetDefaultRenderer()->CreateContext(dc)); gc->DrawBitmap(m_bitmap, x, y, w, h);#else wxImage img = m_bitmap.ConvertToImage(); img.Rescale(wxRound(w), wxRound(h), wxIMAGE_QUALITY_HIGH); dc.DrawBitmap(wxBitmap(img), wxRound(x), wxRound(y), true);#endif}
开发者ID:CodeSmithyIDE,项目名称:wxWidgets,代码行数:52,
示例10: wxDisplaySizebool wxUIActionSimulator::MouseMove(long x, long y){ // Because MOUSEEVENTF_ABSOLUTE takes measurements scaled between 0 & 65535 // we need to scale our input too int displayx, displayy; wxDisplaySize(&displayx, &displayy); int scaledx = wxRound(((float)x / displayx) * 65535); int scaledy = wxRound(((float)y / displayy) * 65535); mouse_event(MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE, scaledx, scaledy, 0, 0); return true;}
开发者ID:Richard-Ni,项目名称:wxWidgets,代码行数:13,
示例11: wxRound/* Function GetSize * returns the actual size (in user units, not in pixels) of the image */wxSize BITMAP_BASE::GetSize() const{ wxSize size; if( m_bitmap ) { size.x = m_bitmap->GetWidth(); size.y = m_bitmap->GetHeight(); size.x = wxRound( size.x * GetScalingFactor() ); size.y = wxRound( size.y * GetScalingFactor() ); } return size;}
开发者ID:hellamps,项目名称:kicad,代码行数:18,
示例12: CreatenumberPopup::numberPopup(wxWindow* parent,int ratio, wxColour colourGreen, wxWindowID){ //wxSizerFlags flagsExpand(1); //flagsExpand.Expand().Border(wxALL, 2); //(*Initialize(numberPopup) wxBoxSizer* BoxSizer1; Create(parent, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSTAY_ON_TOP|wxDEFAULT_FRAME_STYLE|wxFRAME_NO_TASKBAR|wxNO_BORDER, _T("wxID_ANY")); BoxSizer1 = new wxBoxSizer(wxHORIZONTAL); Button1 = new wxButton(this, ID_BUTTON1, _("Label"), wxDefaultPosition, wxDefaultSize, wxNO_BORDER, wxDefaultValidator, _T("ID_BUTTON1")); BoxSizer1->Add(Button1, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); SetSizer(BoxSizer1); Timer1.SetOwner(this, ID_TIMER1); BoxSizer1->Fit(this); BoxSizer1->SetSizeHints(this); Center(); Connect(ID_BUTTON1,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&numberPopup::OnButton1Click); Connect(ID_TIMER1,wxEVT_TIMER,(wxObjectEventFunction)&numberPopup::OnTimer1Trigger); //*) //find the screen size wxSize displaySize = wxGetDisplaySize(); this->SetSize(wxDefaultCoord,wxDefaultCoord,wxRound((double(displaySize.GetWidth()))*(((double)ratio)/100)), wxRound((double(displaySize.GetHeight()))*(((double)ratio)/100)),wxSIZE_FORCE); Button1->SetBackgroundColour(colourGreen); this->SetBackgroundColour(colourGreen);}
开发者ID:ian57,项目名称:LotoClic,代码行数:27,
示例13: initSashPosition void SplitterWindow2::updateSashPosition(const wxSize& oldSize, const wxSize& newSize) { initSashPosition(); if (m_splitMode != SplitMode_Unset) { const wxSize diff = newSize - oldSize; const int actualDiff = wxRound(m_sashGravity * h(diff)); setSashPosition(sashPosition(m_currentSplitRatio, h(oldSize)) + actualDiff); } }
开发者ID:Gustavo6046,项目名称:TrenchBroom,代码行数:9,
示例14: wxRoundvoid wxNativeFontInfo::SetFractionalPointSize(float pointsize){ wxString s; if ( pointsize < 0 ) s = '*'; else s.Printf("%d", wxRound(10*pointsize)); SetXFontComponent(wxXLFD_POINTSIZE, s);}
开发者ID:CodeSmithyIDE,项目名称:wxWidgets,代码行数:10,
示例15: GetGridSizewxPoint BASE_SCREEN::GetNearestGridPosition( const wxPoint& aPosition, wxRealPoint* aGridSize ){ wxPoint pt; wxRealPoint gridSize; if( aGridSize ) gridSize = *aGridSize; else gridSize = GetGridSize(); wxPoint gridOrigin = m_GridOrigin; double offset = fmod( gridOrigin.x, gridSize.x ); int x = wxRound( (aPosition.x - offset) / gridSize.x ); pt.x = wxRound( x * gridSize.x + offset ); offset = fmod( gridOrigin.y, gridSize.y ); int y = wxRound( (aPosition.y - offset) / gridSize.y ); pt.y = wxRound ( y * gridSize.y + offset ); return pt;}
开发者ID:hellamps,项目名称:kicad,代码行数:22,
示例16: sknwxString GRIBTable::GetWindBf(GribRecord **recordarray){ wxString skn(wxEmptyString); int altitude = 0; double vkn, ang; if(GribRecord::getInterpolatedValues(vkn, ang, recordarray[Idx_WIND_VX + altitude], recordarray[Idx_WIND_VY + altitude], m_cursor_lon, m_cursor_lat)) { vkn = m_pGDialog->m_OverlaySettings.GetmstobfFactor(vkn)* vkn; skn.Printf( wxString::Format( _T("%2d bf"), (int)wxRound( vkn )) ); } return skn;}
开发者ID:NicolasJourden,项目名称:OpenCPN,代码行数:14,
示例17: wxRoundvoid EffectChangeSpeed::Update_Vinyl()// Update Vinyl controls from percent change.{ // Match Vinyl rpm when within 0.01% of a standard ratio. // Ratios calculated as: ((toRPM / fromRPM) - 1) * 100 * 100 int ratio = wxRound(m_PercentChange * 100); switch (ratio) { case 0: // toRPM is the same as fromRPM if (mFromVinyl != kVinyl_NA) { mpChoice_ToVinyl->SetSelection(mpChoice_FromVinyl->GetSelection()); } else { // Use the last saved option. GetPrivateConfig(GetCurrentSettingsGroup(), wxT("VinylChoice"), mFromVinyl, 0); mpChoice_FromVinyl->SetSelection(mFromVinyl); mpChoice_ToVinyl->SetSelection(mFromVinyl); } break; case 3500: mpChoice_FromVinyl->SetSelection(kVinyl_33AndAThird); mpChoice_ToVinyl->SetSelection(kVinyl_45); break; case 13400: mpChoice_FromVinyl->SetSelection(kVinyl_33AndAThird); mpChoice_ToVinyl->SetSelection(kVinyl_78); break; case -2593: mpChoice_FromVinyl->SetSelection(kVinyl_45); mpChoice_ToVinyl->SetSelection(kVinyl_33AndAThird); break; case 7333: mpChoice_FromVinyl->SetSelection(kVinyl_45); mpChoice_ToVinyl->SetSelection(kVinyl_78); break; case -5727: mpChoice_FromVinyl->SetSelection(kVinyl_78); mpChoice_ToVinyl->SetSelection(kVinyl_33AndAThird); break; case -4231: mpChoice_FromVinyl->SetSelection(kVinyl_78); mpChoice_ToVinyl->SetSelection(kVinyl_45); break; default: mpChoice_ToVinyl->SetSelection(kVinyl_NA); } // and update variables. mFromVinyl = mpChoice_FromVinyl->GetSelection(); mToVinyl = mpChoice_ToVinyl->GetSelection();}
开发者ID:jengelh,项目名称:audacity,代码行数:50,
示例18: CalcNegPoswxPoint CalcNegPos(const wxRealPoint& pos, const wxPoint& pxPos, int w, int h, int lm, int tm, int rm, int bm, wxDC* dc){ double origX = pos.x; double origY = pos.y; int px_x = pxPos.x; int px_y = pxPos.y; wxSize pageSize = dc->GetSize(); double sx, sy; dc->GetUserScale(&sx, &sy); int pagex = wxRound((double)(pageSize.x)/sx - lm - rm); int pagey = wxRound((double)(pageSize.y)/sy - tm - bm); int x = px_x + lm; int y = px_y + tm; if(origX < 0) x = pagex + px_x - w + lm / sx; else if(origX == wxRP_LEFT) x = lm; else if(origX == wxRP_CENTER) x = (pagex - w) / 2. + lm; else if(origX == wxRP_RIGHT) x = pagex - w + lm; if(origY < 0) y = pagey + px_x - h + tm / sy; else if(origY == wxRP_TOP) y = tm; else if(origY == wxRP_CENTER) y = (pagey - h) / 2. + tm; else if(origY == wxRP_BOTTOM) y = pagey - h + tm; return wxPoint(x, y);}
开发者ID:stahta01,项目名称:wxCode_components,代码行数:36,
示例19: WXSIZEOF/* static */int wxFontBase::AdjustToSymbolicSize(wxFontSymbolicSize size, int base){ // Using a fixed factor (1.2, from CSS2) is a bad idea as explained at // http://www.w3.org/TR/CSS21/fonts.html#font-size-props so use the values // from http://style.cleverchimp.com/font_size_intervals/altintervals.html // instead. static const float factors[] = { 0.60f, 0.75f, 0.89f, 1.f, 1.2f, 1.5f, 2.f }; wxCOMPILE_TIME_ASSERT ( WXSIZEOF(factors) == wxFONTSIZE_XX_LARGE - wxFONTSIZE_XX_SMALL + 1, WrongFontSizeFactorsSize ); return wxRound(factors[size - wxFONTSIZE_XX_SMALL]*base);}
开发者ID:Annovae,项目名称:Dolphin-Core,代码行数:17,
示例20: GetParentvoid DIALOG_GENERALOPTIONS::OnOkClick( wxCommandEvent& event ){ EDA_UNITS_T ii; DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)GetParent()->GetDisplayOptions(); displ_opts->m_DisplayPolarCood = ( m_PolarDisplay->GetSelection() == 0 ) ? false : true; ii = g_UserUnit; g_UserUnit = ( m_UnitsSelection->GetSelection() == 0 ) ? INCHES : MILLIMETRES; if( ii != g_UserUnit ) GetParent()->ReCreateAuxiliaryToolbar(); GetParent()->SetCursorShape( m_CursorShape->GetSelection() ); GetParent()->SetAutoSaveInterval( m_SaveTime->GetValue() * 60 ); GetParent()->SetRotationAngle( wxRound( 10.0 * wxAtof( m_RotationAngle->GetValue() ) ) ); GetParent()->GetScreen()->SetMaxUndoItems( m_spinMaxUndoItems->GetValue() ); /* Updating the combobox to display the active layer. */ displ_opts->m_MaxLinksShowed = m_MaxShowLinks->GetValue(); g_Drc_On = m_DrcOn->GetValue(); if( m_Board->IsElementVisible(RATSNEST_VISIBLE) != m_ShowGlobalRatsnest->GetValue() ) { GetParent()->SetElementVisibility( RATSNEST_VISIBLE, m_ShowGlobalRatsnest->GetValue() ); GetParent()->GetCanvas()->Refresh(); GetParent()->OnModify(); } displ_opts->m_Show_Module_Ratsnest = m_ShowModuleRatsnest->GetValue(); g_AutoDeleteOldTrack = m_TrackAutodel->GetValue(); g_Segments_45_Only = m_Segments_45_Only_Ctrl->GetValue(); g_Track_45_Only_Allowed = m_Track_45_Only_Ctrl->GetValue(); GetParent()->GetCanvas()->SetEnableZoomNoCenter( ! m_ZoomCenterOpt->GetValue() ); GetParent()->GetCanvas()->SetEnableMiddleButtonPan( m_MiddleButtonPANOpt->GetValue() ); GetParent()->GetCanvas()->SetMiddleButtonPanLimited( m_OptMiddleButtonPanLimited->GetValue() ); GetParent()->GetCanvas()->SetEnableAutoPan( m_AutoPANOpt->GetValue() ); g_TwoSegmentTrackBuild = m_Track_DoubleSegm_Ctrl->GetValue(); g_MagneticPadOption = m_MagneticPadOptCtrl->GetSelection(); g_MagneticTrackOption = m_MagneticTrackOptCtrl->GetSelection(); g_DumpZonesWhenFilling = m_DumpZonesWhenFilling->GetValue(); EndModal( wxID_OK );}
开发者ID:corecode,项目名称:kicad-source-mirror,代码行数:46,
示例21: sknwxString GRIBTable::GetWindBf(GribRecord **recordarray){ wxString skn(wxEmptyString); if( recordarray[Idx_WIND_VX] && recordarray[Idx_WIND_VY] ) { double vx = recordarray[Idx_WIND_VX]-> getInterpolatedValue(m_pGDialog->m_cursor_lon, m_pGDialog->m_cursor_lat, true ); double vy = recordarray[Idx_WIND_VY]-> getInterpolatedValue(m_pGDialog->m_cursor_lon, m_pGDialog->m_cursor_lat, true ); if( ( vx != GRIB_NOTDEF ) && ( vy != GRIB_NOTDEF ) ) { double vkn = sqrt( vx * vx + vy * vy ); vkn = m_pGDialog->m_OverlaySettings.GetmstobfFactor(vkn)* vkn; skn.Printf( wxString::Format( _T("%2d bf"), (int)wxRound( vkn )) ); } } return skn;}
开发者ID:aaronbradshaw,项目名称:OpenCPN,代码行数:17,
示例22: Writevoid LATITUDE::Write( SENTENCE& sentence ){ wxString temp_string; int neg = 0; int d; int m; if (Latitude < 0.0) { Latitude = -Latitude; neg = 1; } d = (int) Latitude; double m0 = (Latitude - (double) d) * 60000.0; m = (int)wxRound(m0); if (neg) d = -d; temp_string.Printf(_T("%02d%02d.%03d"), d, m / 1000, m % 1000); sentence += temp_string; if ( Northing == North ) { sentence += _T("N"); } else if ( Northing == South ) { sentence += _T("S"); } else { /* ** Add Nothing */ }}
开发者ID:CarCode,项目名称:Cocoa-OCPN,代码行数:38,
注:本文中的wxRound函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ wxS函数代码示例 C++ wxRenameFile函数代码示例 |