1#if defined(__ANDROID__)
3#include <GL/gl_private.h>
6#elif defined(ocpnUSE_GL)
12#elif defined(__WXOSX__)
14#include <OpenGL/glu.h>
15typedef void (*_GLUfuncptr)();
16#define GL_COMPRESSED_RGB_FXT1_3DFX 0x86B0
18#elif defined(__WXQT__) || defined(__WXGTK__)
29#include "model/comm_n0183_output.h"
30#include "model/georef.h"
31#include "model/multiplexer.h"
32#include "model/own_ship.h"
33#include "model/route.h"
34#include "model/routeman.h"
36#include "color_handler.h"
38#include "glChartCanvas.h"
39#include "n0183_ctx_factory.h"
41#include "ocpn_frame.h"
42#include "OCPNPlatform.h"
44#include "route_point_gui.h"
48#include "waypointman_gui.h"
52extern float g_MarkScaleFactorExp;
67 if (NULL != rpn) *rpn = r;
69 if (!
RoutePointGui(m_point).IsVisibleSelectable(canvas, boverride_viz))
73 if ((abs(r.x) > canvas->GetCanvasWidth() * 4) ||
74 (abs(r.y) > canvas->GetCanvasHeight() * 4))
78 if ((abs(r.x) == INVALID_COORD) || (abs(r.y) == INVALID_COORD))
return;
81 if (m_point.m_IconName == _T(
"empty") && !m_point.
m_bShowName &&
88 pen = g_pRouteMan->GetActiveRoutePointPen();
90 pen = g_pRouteMan->GetRoutePointPen();
95 if ((m_point.
m_bIsActive) && (m_point.m_IconName != _T(
"mob")))
96 pbm = pWayPointMan->GetIconBitmap(_T (
"activepoint" ));
98 pbm = m_point.m_pbmIcon;
100 wxBitmap *pbms = NULL;
101 if ((g_MarkScaleFactorExp > 1.0) && !m_point.m_bPreScaled) {
102 if (m_point.m_IconScaleFactor != g_MarkScaleFactorExp) {
103 wxImage scaled_image = pbm->ConvertToImage();
104 int new_width = pbm->GetWidth() * g_MarkScaleFactorExp;
105 int new_height = pbm->GetHeight() * g_MarkScaleFactorExp;
106 m_point.m_ScaledBMP = wxBitmap(
107 scaled_image.Scale(new_width, new_height, wxIMAGE_QUALITY_HIGH));
109 m_point.m_IconScaleFactor = g_MarkScaleFactorExp;
111 if (m_point.m_ScaledBMP.IsOk()) pbm = &m_point.m_ScaledBMP;
114 int sx2 = pbm->GetWidth() / 2;
115 int sy2 = pbm->GetHeight() / 2;
118 wxRect r1(r.x - sx2, r.y - sy2, sx2 * 2, sy2 * 2);
122 wxFont *dFont = FontMgr::Get().
GetFont(_(
"Marks"));
123 int font_size = wxMax(8, dFont->GetPointSize());
127 font_size, dFont->GetFamily(), dFont->GetStyle(), dFont->GetWeight(),
128 false, dFont->GetFaceName());
131 m_point.CalculateNameExtents();
147 hilitebox.Inflate(20);
150 hilitebox.Inflate(4);
154 wxColour hi_colour = pen->GetColour();
155 unsigned char transparency = 100;
157 hi_colour = GetGlobalColor(_T (
"YELO1" ));
163 AlphaBlending(dc, r.x + hilitebox.x, r.y + hilitebox.y, hilitebox.width,
164 hilitebox.height, radius, hi_colour, transparency);
167 bool bDrawHL =
false;
169 if (m_point.
m_bBlink && (gFrame->nBlinkerTick & 1)) bDrawHL =
true;
171 if ((!bDrawHL) && (NULL != m_point.m_pbmIcon)) {
172 dc.DrawBitmap(*pbm, r.x - sx2, r.y - sy2,
true);
175 dc.CalcBoundingBox(r.x - sx2, r.y - sy2);
176 dc.CalcBoundingBox(r.x + sx2, r.y + sy2);
179 if (m_point.
m_bShowName && m_point.m_MarkName.Length()) {
192 double factor = 1.00;
200 ll_gc_ll(m_point.m_lat, m_point.m_lon, 0, factor, &tlat, &tlon);
204 sqrt(pow((
double)(r.x - r1.x), 2) + pow((
double)(r.y - r1.y), 2));
205 int pix_radius = (int)lpp;
208 wxBrush saveBrush = dc.GetBrush();
209 wxPen savePen = dc.GetPen();
212 wxBRUSHSTYLE_TRANSPARENT));
215 dc.StrokeCircle(r.x, r.y, i * pix_radius);
217 dc.SetBrush(saveBrush);
235 bool use_cached_screen_coords,
bool bVizOverride) {
236 if (!
RoutePointGui(m_point).IsVisibleSelectable(canvas, bVizOverride))
return;
239 if (m_point.m_IconName == _T(
"empty") && !m_point.
m_bShowName &&
245 vp.
rotation == m_point.m_wpBBox_rotation) {
247 LLBBox vpBBox = vp.GetBBox();
248 if (vpBBox.IntersectOut(m_point.
m_wpBBox)) {
252 double factor = 1.00;
259 LLBBox radar_box = m_point.
m_wpBBox;
260 radar_box.EnLarge(radius * 2);
261 if (vpBBox.IntersectOut(radar_box)) {
271 unsigned char transparency = 150;
278 if (r.x == INVALID_COORD)
return;
283 if ((m_point.
m_bIsActive) && (m_point.m_IconName != _T(
"mob")))
284 pbm = pWayPointMan->GetIconBitmap(_T (
"activepoint" ));
286 pbm = m_point.m_pbmIcon;
289 if (!pbm || !pbm->IsOk())
return;
291 int sx2 = pbm->GetWidth() / 2;
292 int sy2 = pbm->GetHeight() / 2;
295 wxRect r1(r.x - sx2, r.y - sy2, sx2 * 2, sy2 * 2);
300 wxFont *dFont = FontMgr::Get().
GetFont(_(
"Marks"));
301 int font_size = wxMax(8, dFont->GetPointSize());
305 font_size, dFont->GetFamily(), dFont->GetStyle(), dFont->GetWeight(),
306 false, dFont->GetFaceName());
314 m_point.CalculateNameExtents();
329 if (!m_point.m_bPreScaled) {
330 hilitebox.x *= g_MarkScaleFactorExp;
331 hilitebox.y *= g_MarkScaleFactorExp;
332 hilitebox.width *= g_MarkScaleFactorExp;
333 hilitebox.height *= g_MarkScaleFactorExp;
338 hilitebox.Inflate(20);
341 hilitebox.Inflate(4);
348 vp.
rotation != m_point.m_wpBBox_rotation) {
349 double lat1, lon1, lat2, lon2;
351 r.y + hilitebox.y + hilitebox.height, lat1, lon1);
353 r.y + hilitebox.y, lat2, lon2);
356 m_point.
m_wpBBox.Set(lat1, lon1, lat2, lon2 + 360);
358 m_point.
m_wpBBox.Set(lat1, lon1, lat2, lon2);
361 m_point.m_wpBBox_rotation = vp.
rotation;
373 wxPen *pen = g_pRouteMan->GetActiveRoutePointPen();
374 hi_colour = pen->GetColour();
376 hi_colour = GetGlobalColor(_T (
"YELO1" ));
379 AlphaBlending(dc, r.x + hilitebox.x, r.y + hilitebox.y, hilitebox.width,
380 hilitebox.height, radius, hi_colour, transparency);
383 bool bDrawHL =
false;
385 if (m_point.
m_bBlink && (gFrame->nBlinkerTick & 1)) bDrawHL =
true;
387 if ((!bDrawHL) && (NULL != m_point.m_pbmIcon)) {
389 unsigned int IconTexture =
392 glBindTexture(GL_TEXTURE_2D, IconTexture);
394 glEnable(GL_TEXTURE_2D);
397 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
398 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
400 int w = r1.width, h = r1.height;
403 if (!m_point.m_bPreScaled) {
404 scale = g_MarkScaleFactorExp;
410 float ws = r1.width *
scale;
411 float hs = r1.height *
scale;
412 float xs = r.x - ws / 2.;
413 float ys = r.y - hs / 2.;
414 float u = (float)w / glw, v = (
float)h / glh;
435 coords[6] = xs, coords[7] = ys + hs;
437 glChartCanvas::RenderSingleTexture(dc, coords, uv, &vp, 0, 0, 0);
440 glDisable(GL_TEXTURE_2D);
449 dc.SelectObject(tbm);
450 dc.SetBackground(wxBrush(*wxBLACK));
452 dc.SetFont(*m_pMarkFont);
453 dc.SetTextForeground(*wxWHITE);
454 dc.DrawText(m_MarkName, 0, 0);
455 dc.SelectObject(wxNullBitmap);
458 wxImage image = tbm.ConvertToImage();
459 unsigned char *d = image.GetData();
460 unsigned char *e =
new unsigned char[w * h];
462 for (
int p = 0; p < w * h; p++) e[p] = d[3 * p + 0];
466 glGenTextures(1, &m_iTextTexture);
467 glBindTexture(GL_TEXTURE_2D, m_iTextTexture);
469 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
470 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
472 m_iTextTextureWidth = NextPow2(w);
473 m_iTextTextureHeight = NextPow2(h);
474 glTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA, m_iTextTextureWidth,
475 m_iTextTextureHeight, 0, GL_ALPHA, GL_UNSIGNED_BYTE, NULL);
476 glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, w, h, GL_ALPHA, GL_UNSIGNED_BYTE,
486 temp_dc.SelectObject(bmp);
489 temp_dc.SetBackground(wxBrush(wxColour(0, 0, 0)));
494 temp_dc.SetTextForeground(wxColour(255, 255, 255));
495 temp_dc.DrawText(m_point.m_MarkName, 0, 0);
496 temp_dc.SelectObject(wxNullBitmap);
500 wxImage image = bmp.ConvertToImage();
502 unsigned char *data =
new unsigned char[w * h * 4];
503 unsigned char *im = image.GetData();
509 for (
int i = 0; i < h; i++) {
510 for (
int j = 0; j < w; j++) {
511 unsigned int index = ((i * w) + j) * 4;
515 data[index + 3] = im[((i * w) + j) * 3];
524 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
525 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
532 glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, w, h, GL_RGBA, GL_UNSIGNED_BYTE,
537 glEnable(GL_TEXTURE_2D);
539 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
548 glEnable(GL_TEXTURE_2D);
574 coords[6] = x, coords[7] = y + h;
576 glChartCanvas::RenderSingleTexture(dc, coords, uv, &vp, 0, 0, 0);
579 glDisable(GL_TEXTURE_2D);
586 double factor = 1.00;
594 ll_gc_ll(m_point.m_lat, m_point.m_lon, 0, factor, &tlat, &tlon);
598 sqrt(pow((
double)(r.x - r1.x), 2) + pow((
double)(r.y - r1.y), 2));
599 int pix_radius = (int)lpp;
601 extern wxColor GetDimColor(wxColor c);
605 double platform_pen_width =
606 wxRound(wxMax(1.0, g_Platform->GetDisplayDPmm() / 2));
607 wxPen ppPen1(ring_dim_color, platform_pen_width);
608 wxBrush saveBrush = dc.GetBrush();
609 wxPen savePen = dc.GetPen();
611 dc.SetBrush(wxBrush(ring_dim_color, wxBRUSHSTYLE_TRANSPARENT));
614 dc.StrokeCircle(r.x, r.y, i * pix_radius);
616 dc.SetBrush(saveBrush);
620 if (m_point.m_bDrawDragHandle) {
622 double platform_pen_width = wxRound(
623 wxMax(1.0, g_Platform->GetDisplayDPmm() /
626 wxColor dh_color = GetGlobalColor(_T (
"YELO1" ));
627 wxPen ppPen1(dh_color, 3 * platform_pen_width);
629 dc.DrawLine(r.x + hilitebox.width / 4, r.y + hilitebox.height / 4,
630 r.x + m_point.m_drag_line_length_man,
631 r.y + m_point.m_drag_line_length_man);
633 dh_color = wxColor(0, 0, 0);
634 wxPen ppPen2(dh_color, platform_pen_width);
636 dc.DrawLine(r.x + hilitebox.width / 4, r.y + hilitebox.height / 4,
637 r.x + m_point.m_drag_line_length_man,
638 r.y + m_point.m_drag_line_length_man);
641 glBindTexture(GL_TEXTURE_2D, m_point.m_dragIconTexture);
643 glEnable(GL_TEXTURE_2D);
646 int x = r.x + m_point.m_drag_icon_offset,
647 y = r.y + m_point.m_drag_icon_offset, w = m_point.m_dragIcon.GetWidth(),
648 h = m_point.m_dragIcon.GetHeight();
652 float ws = w *
scale;
653 float hs = h *
scale;
654 float xs = x - ws / 2.;
655 float ys = y - hs / 2.;
656 float u = (float)w / m_point.m_dragIconTextureWidth,
657 v = (
float)h / m_point.m_dragIconTextureWidth;
678 coords[6] = xs, coords[7] = ys + hs;
680 glChartCanvas::RenderSingleTexture(dc, coords, uv, &vp, 0, 0, 0);
683 glDisable(GL_TEXTURE_2D);
700void RoutePointGui::CalculateDCRect(wxDC &dc,
ChartCanvas *canvas,
703 dc.ResetBoundingBox();
704 dc.DestroyClippingRegion();
708 odc.SetVP(canvas->GetVP());
710 Draw(odc, canvas, NULL);
713 prect->x = dc.MinX() - 1;
714 prect->y = dc.MinY() - 1;
715 prect->width = dc.MaxX() - dc.MinX() + 2;
716 prect->height = dc.MaxY() - dc.MinY() + 2;
720bool RoutePointGui::IsVisibleSelectable(
ChartCanvas *cc,
bool boverrideViz) {
721 return m_point.IsVisibleSelectable(cc->GetScaleValue(), boverrideViz);
724wxPoint2DDouble RoutePointGui::GetDragHandlePoint(
ChartCanvas *canvas) {
725 if (!m_point.m_bDrawDragHandle)
726 return wxPoint2DDouble(m_point.m_lon, m_point.m_lat);
728 return computeDragHandlePoint(canvas);
731void RoutePointGui::SetPointFromDraghandlePoint(
ChartCanvas *canvas,
double lat,
737 r.y - m_point.m_drag_icon_offset, tlat, tlon);
738 m_point.m_lat = tlat;
739 m_point.m_lon = tlon;
742void RoutePointGui::SetPointFromDraghandlePoint(
ChartCanvas *canvas,
int x,
746 x - m_point.m_drag_icon_offset - m_point.m_draggingOffsetx,
747 y - m_point.m_drag_icon_offset - m_point.m_draggingOffsety, tlat, tlon);
748 m_point.m_lat = tlat;
749 m_point.m_lon = tlon;
752void RoutePointGui::PresetDragOffset(
ChartCanvas *canvas,
int x,
int y) {
756 m_point.m_draggingOffsetx = x - (r.x + m_point.m_drag_icon_offset);
757 m_point.m_draggingOffsety = y - (r.y + m_point.m_drag_icon_offset);
760wxPoint2DDouble RoutePointGui::computeDragHandlePoint(
ChartCanvas *canvas) {
765 r.y + m_point.m_drag_icon_offset, lat, lon);
768 m_point.m_dragHandleLat = lat;
769 m_point.m_dragHandleLon = lon;
771 return wxPoint2DDouble(lon, lat);
774void RoutePointGui::ShowScaleWarningMessage(
ChartCanvas *canvas) {
775 wxString strA = _(
"The ScaMin value for new waypoints is set to");
776 wxString strB = _(
"but current chartscale is");
778 _(
"Therefore the new waypoint will not be visible at this zoom level.");
780 wxString::Format(_T(
"%s %li,\n %s %.0f.\n%s"), strA, m_point.GetScaMin(),
781 strB, canvas->GetScaleValue(), strC);
782 OCPNMessageBox(canvas, MessStr);
785void RoutePointGui::EnableDragHandle(
bool bEnable) {
786 m_point.m_bDrawDragHandle = bEnable;
788 if (!m_point.m_dragIcon.IsOk()) {
791 int bm_size = g_Platform->GetDisplayDPmm() * 9;
794 wxString UserIconPath = g_Platform->GetSharedDataDir() + _T(
"uidata") +
795 wxFileName::GetPathSeparator();
797 m_point.m_dragIcon = LoadSVG(UserIconPath + _T(
"DragHandle.svg"), bm_size,
798 bm_size, m_point.m_pbmIcon);
803 if (m_point.m_dragIconTexture == 0) {
804 glGenTextures(1, &m_point.m_dragIconTexture);
805 glBindTexture(GL_TEXTURE_2D, m_point.m_dragIconTexture);
807 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
808 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
809 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
811 wxImage image = m_point.m_dragIcon.ConvertToImage();
812 int w = image.GetWidth(), h = image.GetHeight();
814 m_point.m_dragIconTextureWidth = NextPow2(w);
815 m_point.m_dragIconTextureHeight = NextPow2(h);
817 unsigned char *d = image.GetData();
818 unsigned char *a = image.GetAlpha();
820 unsigned char mr, mg, mb;
821 image.GetOrFindMaskColour(&mr, &mg, &mb);
823 unsigned char *e =
new unsigned char[4 * w * h];
825 for (
int y = 0; y < h; y++)
826 for (
int x = 0; x < w; x++) {
827 unsigned char r, g, b;
828 int off = (y * image.GetWidth() + x);
837 a ? a[off] : ((r == mr) && (g == mg) && (b == mb) ? 0 : 255);
841 glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, m_point.m_dragIconTextureWidth,
842 m_point.m_dragIconTextureHeight, 0, GL_RGBA,
843 GL_UNSIGNED_BYTE, NULL);
844 glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, w, h, GL_RGBA, GL_UNSIGNED_BYTE,
852 if (m_point.m_dragIcon.IsOk()) {
853 m_point.m_drag_line_length_man = bm_size;
854 m_point.m_drag_icon_offset = bm_size;
856 m_point.m_drag_line_length_man = 64;
857 m_point.m_drag_icon_offset = 64;
863void RoutePointGui::ReLoadIcon(
void) {
864 if (!pWayPointMan)
return;
865 bool icon_exists = pWayPointMan->DoesIconExist(m_point.m_IconName);
867 wxString iconUse = m_point.m_IconName;
871 wxString tentative_icon = m_point.m_IconName.Lower();
872 if (pWayPointMan->DoesIconExist(tentative_icon)) {
874 m_point.m_IconName = tentative_icon;
875 iconUse = m_point.m_IconName;
880 if (!pWayPointMan->DoesIconExist(_T(
"tempsub"))) {
883 wxBitmap bmp = style->GetIcon(_T(
"circle"));
885 wxImage image = bmp.ConvertToImage();
887 .ProcessIcon(image,
"tempsub",
"tempsub");
891 iconUse = _T(
"tempsub");
895 m_point.m_pbmIcon = pWayPointMan->GetIconBitmap(iconUse);
896 m_point.m_bPreScaled = pWayPointMan->GetIconPrescaled(iconUse);
899 m_point.m_wpBBox_view_scale_ppm = -1;
904 m_point.m_IconScaleFactor = -1;
909bool RoutePointGui::SendToGPS(
const wxString &com_name,
SendToGpsDlg *dialog) {
911 ::wxBeginBusyCursor();
912 int result = SendWaypointToGPS_N0183(&m_point, com_name, *g_pMUX, dlg_ctx);
917 msg = _(
"Waypoint(s) Transmitted.");
920 case ERR_GARMIN_INITIALIZE:
921 msg = _(
"Error on Waypoint Upload. Garmin GPS not connected");
923 case ERR_GPS_DRIVER_NOT_AVAILAIBLE:
924 msg = _(
"Error on Waypoint Upload. GPS driver not available");
926 case ERR_GARMIN_SEND_MESSAGE:
928 msg = _(
"Error on Waypoint Upload. Please check logfiles...");
933 OCPNMessageBox(NULL, msg, _(
"OpenCPN Info"), wxOK | wxICON_INFORMATION);
935 return (result == 0);
938int RoutePointGui::GetIconImageIndex() {
939 if (m_point.IsShared()) {
941 wxArrayPtrVoid *proute_array =
945 bool brp_viz =
false;
947 for (
unsigned int ir = 0; ir < proute_array->GetCount(); ir++) {
949 if (pr->IsVisible()) {
960 if (m_point.IsVisible())
961 return (pWayPointMan->GetIconImageListIndex(GetIconBitmap()));
968 if (m_point.IsVisible())
969 return (pWayPointMan->GetIconImageListIndex(GetIconBitmap()));
ChartCanvas - Main chart display and interaction component.
bool GetCanvasPointPix(double rlat, double rlon, wxPoint *r)
Convert latitude/longitude to canvas pixel coordinates (physical pixels) rounded to nearest integer.
void GetCanvasPixPoint(double x, double y, double &lat, double &lon)
Convert canvas pixel coordinates (physical pixels) to latitude/longitude.
wxFont * FindOrCreateFont(int point_size, wxFontFamily family, wxFontStyle style, wxFontWeight weight, bool underline=false, const wxString &facename=wxEmptyString, wxFontEncoding encoding=wxFONTENCODING_DEFAULT)
Creates or finds a matching font in the font cache.
wxColour GetFontColor(const wxString &TextElement) const
Gets the text color for a UI element.
wxFont * GetFont(const wxString &TextElement, int requested_font_size=0)
Gets a font object for a UI element.
wxColour m_wxcWaypointRangeRingsColour
Color for the range rings display.
LLBBox m_wpBBox
Bounding box for the waypoint.
int m_iWaypointRangeRingsNumber
Number of range rings to display around the waypoint.
int m_NameLocationOffsetX
Horizontal offset for waypoint name placement relative to the icon.
bool m_bRPIsBeingEdited
Flag indicating if this waypoint is currently being edited.
wxRect CurrentRect_in_DC
Current rectangle occupied by the waypoint in the display.
unsigned int m_iTextTexture
Texture identifier for rendered text.
int m_NameLocationOffsetY
Vertical offset for waypoint name placement relative to the icon.
bool m_pos_on_screen
Flag indicating if the waypoint is currently visible on screen.
bool m_bIsActive
Flag indicating if this waypoint is active for navigation.
int m_iTextTextureHeight
Height of the text texture in pixels.
bool m_IconIsDirty
Flag indicating if the waypoint icon needs to be reloaded or redrawn.
wxFont * m_pMarkFont
Font used for rendering the waypoint name.
bool m_bShowName
Flag indicating if the waypoint name should be shown.
bool m_bBlink
Flag indicating if the waypoint should blink when displayed.
bool m_bPtIsSelected
Flag indicating if this waypoint is currently selected.
int m_iTextTextureWidth
Width of the text texture in pixels.
wxColour m_FontColor
Color used for rendering the waypoint name.
wxSize m_NameExtents
Size of the waypoint name text when rendered.
int m_iWaypointRangeRingsStepUnits
Units for the range rings step (0=nm, 1=km).
float m_fWaypointRangeRingsStep
Distance between consecutive range rings.
wxPoint2DDouble m_screen_pos
Cached screen position of the waypoint for drawing arrows and points.
bool m_bShowWaypointRangeRings
Flag indicating if range rings should be shown around the waypoint.
Represents a navigational route in the navigation system.
wxArrayPtrVoid * GetRouteArrayContaining(RoutePoint *pWP)
Find all routes that contain the given waypoint.
Dialog for sending routes/waypoints to a GPS device.
ViewPort - Core geographic projection and coordinate transformation engine.
double view_scale_ppm
Requested view scale in physical pixels per meter (ppm), before applying projections.
double rotation
Rotation angle of the viewport in radians.
int GetXIconImageListIndex(const wxBitmap *pbm) const
index of "X-ed out" icon in the image list
int GetFIconImageListIndex(const wxBitmap *pbm) const
index of "fixed viz" icon in the image list
Device context class that can use either wxDC or OpenGL for drawing.
PlugIn Object Definition/API.
wxWindow * GetOCPNCanvasWindow()
Gets OpenCPN's main canvas window.
double OCPN_GetWinDIPScaleFactor()
Gets Windows-specific DPI scaling factor.