diff options
Diffstat (limited to 'geography/opencpn-plugin-draw/patches/patch-src_ocpn_draw_pi.cpp')
-rw-r--r-- | geography/opencpn-plugin-draw/patches/patch-src_ocpn_draw_pi.cpp | 79 |
1 files changed, 77 insertions, 2 deletions
diff --git a/geography/opencpn-plugin-draw/patches/patch-src_ocpn_draw_pi.cpp b/geography/opencpn-plugin-draw/patches/patch-src_ocpn_draw_pi.cpp index a2f3eb65a20..52324a3e533 100644 --- a/geography/opencpn-plugin-draw/patches/patch-src_ocpn_draw_pi.cpp +++ b/geography/opencpn-plugin-draw/patches/patch-src_ocpn_draw_pi.cpp @@ -1,8 +1,8 @@ -$NetBSD: patch-src_ocpn_draw_pi.cpp,v 1.1 2016/05/23 08:55:15 bouyer Exp $ +$NetBSD: patch-src_ocpn_draw_pi.cpp,v 1.2 2016/05/23 13:10:15 bouyer Exp $ https://github.com/jongough/ocpn_draw_pi/issues/250 --- src/ocpn_draw_pi.cpp.orig 2016-04-13 08:28:11.000000000 +0200 -+++ src/ocpn_draw_pi.cpp 2016-05-22 12:46:48.678028290 +0200 ++++ src/ocpn_draw_pi.cpp 2016-05-23 14:51:23.159399881 +0200 @@ -217,7 +217,6 @@ PlugIn_ViewPort *g_pVP; @@ -62,3 +62,78 @@ https://github.com/jongough/ocpn_draw_pi/issues/250 g_pODRolloverWin->GetPosition().x, g_pODRolloverWin->GetPosition().y, false ); } +@@ -2461,8 +2461,6 @@ + + void ocpn_draw_pi::RenderPathLegs( ODDC &dc ) + { +- ODDC tdc( dc ); +- + if( nBoundary_State >= 2) { + + Boundary* boundary = 0; +@@ -2492,7 +2490,7 @@ + } + + // if( !IsTouchInterface_PlugIn) { +- boundary->DrawPointWhich( tdc, boundary->m_lastMousePointIndex, &lastPoint ); ++ boundary->DrawPointWhich( dc, boundary->m_lastMousePointIndex, &lastPoint ); + if( boundary->m_NextLegGreatCircle ) { + for( int i=1; i<=milesDiff; i++ ) { + double p = (double)i * (1.0/(double)milesDiff); +@@ -2500,24 +2498,24 @@ + Geodesic::GreatCircleTravel( m_prev_rlon, m_prev_rlat, gcDist*p, brg, &pLon, &pLat, &gcBearing2 ); + GetCanvasPixLL( m_pVP, &destPoint, m_cursor_lat, m_cursor_lon); + //destPoint = VPoint.GetPixFromLL( pLat, pLon ); +- boundary->DrawSegment( tdc, &lastPoint, &destPoint, *m_pVP, false ); ++ boundary->DrawSegment( dc, &lastPoint, &destPoint, *m_pVP, false ); + wxPoint rpn; +- boundary->GetPoint( 1 )->Draw( tdc, &rpn ); +- boundary->DrawSegment( tdc, &rpn , &destPoint, *m_pVP, false ); ++ boundary->GetPoint( 1 )->Draw( dc, &rpn ); ++ boundary->DrawSegment( dc, &rpn , &destPoint, *m_pVP, false ); + lastPoint = destPoint; + } + } + else { +- boundary->DrawSegment( tdc, &lastPoint, &r_rband, *m_pVP, false ); ++ boundary->DrawSegment( dc, &lastPoint, &r_rband, *m_pVP, false ); + if ( nBoundary_State >= 2) { + wxPoint rpn; +- boundary->GetPoint( 1 )->Draw( tdc, &rpn ); +- boundary->DrawSegment( tdc, &rpn , &r_rband, *m_pVP, false ); ++ boundary->GetPoint( 1 )->Draw( dc, &rpn ); ++ boundary->DrawSegment( dc, &rpn , &r_rband, *m_pVP, false ); + } + } + +- wxString info = CreateExtraPathLegInfo(tdc, boundary, brg, dist, m_cursorPoint); +- RenderExtraPathLegInfo( tdc, r_rband, info ); ++ wxString info = CreateExtraPathLegInfo(dc, boundary, brg, dist, m_cursorPoint); ++ RenderExtraPathLegInfo( dc, r_rband, info ); + } else if( nEBL_State > 0 || m_bEBLMoveOrigin ) { + EBL *ebl = new EBL(); + double brg, dist; +@@ -2526,19 +2524,17 @@ + ODPoint *tp = (ODPoint *) m_pSelectedEBL->m_pODPointList->GetLast()->GetData(); + GetCanvasPixLL( g_pVP, &tpoint, tp->m_lat, tp->m_lon ); + DistanceBearingMercator_Plugin( m_cursor_lat, m_cursor_lon, tp->m_lat, tp->m_lon, &brg, &dist ); +- ebl->DrawSegment( tdc, &tpoint, &m_cursorPoint, *m_pVP, false ); ++ ebl->DrawSegment( dc, &tpoint, &m_cursorPoint, *m_pVP, false ); + } else { + GetCanvasPixLL( g_pVP, &tpoint, g_pfFix.Lat, g_pfFix.Lon ); + DistanceBearingMercator_Plugin( m_cursor_lat, m_cursor_lon, g_pfFix.Lat, g_pfFix.Lon, &brg, &dist ); +- ebl->DrawSegment( tdc, &tpoint, &m_cursorPoint, *m_pVP, false ); ++ ebl->DrawSegment( dc, &tpoint, &m_cursorPoint, *m_pVP, false ); + } +- wxString info = CreateExtraPathLegInfo(tdc, ebl, brg, dist, m_cursorPoint); ++ wxString info = CreateExtraPathLegInfo(dc, ebl, brg, dist, m_cursorPoint); + if(info.length() > 0) +- RenderExtraPathLegInfo( tdc, m_cursorPoint, info ); ++ RenderExtraPathLegInfo( dc, m_cursorPoint, info ); + delete ebl; + } +- +- + } + + wxString ocpn_draw_pi::CreateExtraPathLegInfo(ODDC &dc, ODPath *path, double brg, double dist, wxPoint ref_point) |