SAGA API Version 9.14
Loading...
Searching...
No Matches
map_legend.h
Go to the documentation of this file.
1
3// //
4// SAGA //
5// //
6// System for Automated Geoscientific Analyses //
7// //
8// Application Programming Interface //
9// //
10// Library: SAGA_API //
11// //
12//-------------------------------------------------------//
13// //
14// map_legend.h //
15// //
16// Copyright (C) 2026 by //
17// Olaf Conrad //
18// //
19//-------------------------------------------------------//
20// //
21// This file is part of 'SAGA - System for Automated //
22// Geoscientific Analyses'. SAGA is free software; you //
23// can redistribute it and/or modify it under the terms //
24// of the GNU General Public License as published by the //
25// Free Software Foundation, either version 2 of the //
26// License, or (at your option) any later version. //
27// //
28// SAGA is distributed in the hope that it will be //
29// useful, but WITHOUT ANY WARRANTY; without even the //
30// implied warranty of MERCHANTABILITY or FITNESS FOR A //
31// PARTICULAR PURPOSE. See the GNU General Public //
32// License for more details. //
33// //
34// You should have received a copy of the GNU General //
35// Public License along with this program; if not, see //
36// <http://www.gnu.org/licenses/>. //
37// //
38//-------------------------------------------------------//
39// //
40// e-mail: oconrad@saga-gis.org //
41// //
42// contact: Olaf Conrad //
43// Institute of Geography //
44// University of Hamburg //
45// Germany //
46// //
48
49//---------------------------------------------------------
50#ifndef _HEADER_INCLUDED__SAGA_API__Map_Legend_H
51#define _HEADER_INCLUDED__SAGA_API__Map_Legend_H
52
53
55// //
56// //
57// //
59
60//---------------------------------------------------------
61#include "../api_core.h"
62
63//---------------------------------------------------------
64#include <wx/dc.h>
65
66
68// //
69// //
70// //
72
73//---------------------------------------------------------
75{
76public:
77 CSG_Map_Legend(class CSG_Map_Layer *pLayer);
78
79 enum { VERTICAL = 0, HORIZONTAL };
80
81 wxSize Get_Size (double Zoom, double Zoom_Map);
82
83 void Draw (wxDC &dc, double Zoom, double Zoom_Map, wxPoint Position, wxSize *pSize = NULL);
84
85 int Get_Orientation (void) const { return( m_Orientation ); }
86 void Set_Orientation (int Orientation);
87
89
90
91protected:
92
94
95 double m_Zoom = 1., m_Zoom_Map = 1.;
96
97 wxPoint m_Position;
98
99 wxSize m_Size;
100
101 wxPen m_oldPen;
102
103 wxBrush m_oldBrush;
104
105 wxFont m_oldFont;
106
107 class CSG_Map_Layer *m_pLayer = NULL;
108
110
111
112 void _Set_Size (int xSet, int yAdd);
113 void _Set_Font (wxDC &dc, int Style);
114
115 void _Draw_Title (wxDC &dc, int Style, wxString Text);
116 void _Draw_Label (wxDC &dc, int y, wxString Text, int yAlign);
117
118 void _Draw_Box (wxDC &dc, int y, int dy, int Style, int LineColor, int FillColor, wxString Text);
119 void _Draw_Box (wxDC &dc, int y, int dy, int Style, int iClass);
120 void _Draw_Boxes (wxDC &dc, int y, int Style, double zFactor = 1.0);
121
122 void _Draw_Point (wxDC &dc, class CSG_Map_Shapes_Point *pLayer);
123 void _Draw_Line (wxDC &dc, class CSG_Map_Shapes_Line *pLayer);
124 void _Draw_Polygon (wxDC &dc, class CSG_Map_Shapes_Polygon *pLayer);
125 void _Draw_TIN (wxDC &dc, class CSG_Map_TIN *pLayer);
126 void _Draw_PointCloud (wxDC &dc, class CSG_Map_PointCloud *pLayer);
127 void _Draw_Grid (wxDC &dc, class CSG_Map_Grid *pLayer);
128 void _Draw_Grids (wxDC &dc, class CSG_Map_Grids *pLayer);
129
130 void _Draw_CompositeBand (wxDC &dc, int y, int dy, int Style, int Band, class CSG_Map_Grid *pLayer);
131 void _Draw_CompositeBand (wxDC &dc, int y, int dy, int Style, int Band, class CSG_Map_Grids *pLayer);
132 void _Draw_CompositeBand (wxDC &dc, int y, int dy, int Style, int Band, const wxString &Text);
133
134 void _Draw_Layer_Image (wxDC &dc, int y, class CSG_Map_Layer *pLayer);
135
136 void _Draw_Continuum (wxDC &dc, int y, double zFactor);
137 void _Draw_Continuum_V (wxDC &dc, int y, double zMin, double zMax, double zFactor, double dz, int dyFont);
138 void _Draw_Continuum_H (wxDC &dc, int y, double zMin, double zMax, double zFactor, double dz, int dyFont);
139
140};
141
142
144// //
145// //
146// //
148
149//---------------------------------------------------------
150#endif // #ifndef _HEADER_INCLUDED__SAGA_API__Map_Legend_H
#define SAGA_API_DLL_EXPORT
Definition api_core.h:94
void _Draw_Boxes(wxDC &dc, int y, int Style, double zFactor=1.0)
void _Draw_Layer_Image(wxDC &dc, int y, class CSG_Map_Layer *pLayer)
void _Draw_Polygon(wxDC &dc, class CSG_Map_Shapes_Polygon *pLayer)
void _Draw_Line(wxDC &dc, class CSG_Map_Shapes_Line *pLayer)
CSG_Map_Legend(class CSG_Map_Layer *pLayer)
void _Draw_Grid(wxDC &dc, class CSG_Map_Grid *pLayer)
void _Draw_Point(wxDC &dc, class CSG_Map_Shapes_Point *pLayer)
double m_Zoom_Map
Definition map_legend.h:95
void _Draw_TIN(wxDC &dc, class CSG_Map_TIN *pLayer)
void _Draw_Continuum_H(wxDC &dc, int y, double zMin, double zMax, double zFactor, double dz, int dyFont)
void _Draw_Label(wxDC &dc, int y, wxString Text, int yAlign)
class CSG_Map_Symbology * m_pSymbology
Definition map_legend.h:109
void _Set_Font(wxDC &dc, int Style)
void _Draw_Title(wxDC &dc, int Style, wxString Text)
wxPoint m_Position
Definition map_legend.h:97
void _Draw_Continuum_V(wxDC &dc, int y, double zMin, double zMax, double zFactor, double dz, int dyFont)
int Get_Orientation(void) const
Definition map_legend.h:85
wxBrush m_oldBrush
Definition map_legend.h:103
void _Set_Size(int xSet, int yAdd)
void _Draw_PointCloud(wxDC &dc, class CSG_Map_PointCloud *pLayer)
class CSG_Map_Layer * m_pLayer
Definition map_legend.h:107
void _Draw_Continuum(wxDC &dc, int y, double zFactor)
wxString m_Title
Definition map_legend.h:88
void _Draw_CompositeBand(wxDC &dc, int y, int dy, int Style, int Band, class CSG_Map_Grid *pLayer)
void _Draw_Grids(wxDC &dc, class CSG_Map_Grids *pLayer)
wxString m_Subtitle
Definition map_legend.h:88
void _Draw_Box(wxDC &dc, int y, int dy, int Style, int LineColor, int FillColor, wxString Text)