SAGA API Version 9.14
Loading...
Searching...
No Matches
dc_helper.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// dc_helper.h //
15// //
16// Copyright (C) 2009 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_dc_helper_H
51#define HEADER_INCLUDED__SAGA_API_dc_helper_H
52
53
55// //
56// //
57// //
59
60//---------------------------------------------------------
61#include "parameters.h"
62
63//---------------------------------------------------------
64#include <wx/dc.h>
65#include <wx/settings.h>
66
67
69// //
70// //
71// //
73
74//---------------------------------------------------------
75SAGA_API_DLL_EXPORT wxColour SG_System_Get_Color (wxSystemColour index);
78
79//---------------------------------------------------------
80SAGA_API_DLL_EXPORT bool SG_Set_Font (CSG_Parameter *pFont, wxFont &Font, wxColour &Colour);
81SAGA_API_DLL_EXPORT bool SG_Set_Font (const wxFont &Font, wxColour Colour, CSG_Parameter *pFont);
83
84//---------------------------------------------------------
85SAGA_API_DLL_EXPORT int SG_Get_Color (const wxColour &Color);
86SAGA_API_DLL_EXPORT wxColour SG_Get_wxColor (int Color);
87
88
90// //
91// //
92// //
94
95//---------------------------------------------------------
96enum
97{
102};
103
104//---------------------------------------------------------
105SAGA_API_DLL_EXPORT void SG_DC_Draw_Edge (wxDC &dc, int Edge_Style, int ax, int ay, int bx, int by);
106SAGA_API_DLL_EXPORT void SG_DC_Draw_Edge (wxDC &dc, int Edge_Style, wxRect r);
107
108//---------------------------------------------------------
109SAGA_API_DLL_EXPORT void SG_DC_Draw_Rect (wxDC &dc, wxColour Color, int ax, int ay, int bx, int by);
110SAGA_API_DLL_EXPORT void SG_DC_Draw_Rect (wxDC &dc, wxColour Color, wxRect r);
111
112//---------------------------------------------------------
113SAGA_API_DLL_EXPORT void SG_DC_Draw_FillRect (wxDC &dc, wxColour Color, int ax, int ay, int bx, int by);
114SAGA_API_DLL_EXPORT void SG_DC_Draw_FillRect (wxDC &dc, wxColour Color, wxRect r);
115
116
118// //
119// //
120// //
122
123//---------------------------------------------------------
124#define SG_DC_TEXTALIGN_LEFT 0x01
125#define SG_DC_TEXTALIGN_XCENTER 0x02
126#define SG_DC_TEXTALIGN_RIGHT 0x04
127#define SG_DC_TEXTALIGN_TOP 0x08
128#define SG_DC_TEXTALIGN_YCENTER 0x10
129#define SG_DC_TEXTALIGN_BOTTOM 0x20
130
131#define SG_DC_TEXTALIGN_TOPLEFT (SG_DC_TEXTALIGN_TOP |SG_DC_TEXTALIGN_LEFT)
132#define SG_DC_TEXTALIGN_TOPCENTER (SG_DC_TEXTALIGN_TOP |SG_DC_TEXTALIGN_XCENTER)
133#define SG_DC_TEXTALIGN_TOPRIGHT (SG_DC_TEXTALIGN_TOP |SG_DC_TEXTALIGN_RIGHT)
134#define SG_DC_TEXTALIGN_CENTERLEFT (SG_DC_TEXTALIGN_YCENTER|SG_DC_TEXTALIGN_LEFT)
135#define SG_DC_TEXTALIGN_CENTER (SG_DC_TEXTALIGN_YCENTER|SG_DC_TEXTALIGN_XCENTER)
136#define SG_DC_TEXTALIGN_CENTERRIGHT (SG_DC_TEXTALIGN_YCENTER|SG_DC_TEXTALIGN_RIGHT)
137#define SG_DC_TEXTALIGN_BOTTOMLEFT (SG_DC_TEXTALIGN_BOTTOM |SG_DC_TEXTALIGN_LEFT)
138#define SG_DC_TEXTALIGN_BOTTOMCENTER (SG_DC_TEXTALIGN_BOTTOM |SG_DC_TEXTALIGN_XCENTER)
139#define SG_DC_TEXTALIGN_BOTTOMRIGHT (SG_DC_TEXTALIGN_BOTTOM |SG_DC_TEXTALIGN_RIGHT)
140
141#define SG_DC_TEXTEFFECT_NONE 0x00
142#define SG_DC_TEXTEFFECT_TOP 0x01
143#define SG_DC_TEXTEFFECT_TOPLEFT 0x02
144#define SG_DC_TEXTEFFECT_LEFT 0x04
145#define SG_DC_TEXTEFFECT_BOTTOMLEFT 0x08
146#define SG_DC_TEXTEFFECT_BOTTOM 0x10
147#define SG_DC_TEXTEFFECT_BOTTOMRIGHT 0x20
148#define SG_DC_TEXTEFFECT_RIGHT 0x40
149#define SG_DC_TEXTEFFECT_TOPRIGHT 0x80
150#define SG_DC_TEXTEFFECT_FRAME (SG_DC_TEXTEFFECT_TOPLEFT|SG_DC_TEXTEFFECT_BOTTOMLEFT|SG_DC_TEXTEFFECT_BOTTOMRIGHT|SG_DC_TEXTEFFECT_TOPRIGHT)
151
152//---------------------------------------------------------
153SAGA_API_DLL_EXPORT void SG_DC_Draw_Text (wxDC &dc, int Align, int x, int y, const wxString &Text);
154SAGA_API_DLL_EXPORT void SG_DC_Draw_Text (wxDC &dc, int Align, int x, int y, double Angle, const wxString &Text);
155
156SAGA_API_DLL_EXPORT void SG_DC_Draw_Text (wxDC &dc, int Align, int x, int y , const wxString &Text, int Effect, wxColour Effect_Color, int Effect_Size = 1);
157SAGA_API_DLL_EXPORT void SG_DC_Draw_Text (wxDC &dc, int Align, int x, int y, double Angle, const wxString &Text, int Effect, wxColour Effect_Color, int Effect_Size = 1);
158
159
161// //
162// //
163// //
165
166//---------------------------------------------------------
167#define SG_DC_SCALE_HORIZONTAL 0x00
168#define SG_DC_SCALE_VERTICAL 0x01
169
170//---------------------------------------------------------
171#define SG_DC_SCALE_TICK_NONE 0x00
172#define SG_DC_SCALE_TICK_TOP 0x01
173#define SG_DC_SCALE_TICK_BOTTOM 0x02
174
175//---------------------------------------------------------
176#define SG_DC_SCALE_STYLE_DEFAULT 0x00
177#define SG_DC_SCALE_STYLE_DESCENDENT 0x02
178#define SG_DC_SCALE_STYLE_LINECONN 0x04
179#define SG_DC_SCALE_STYLE_BLACKWHITE 0x08
180#define SG_DC_SCALE_STYLE_GLOOMING 0x10
181#define SG_DC_SCALE_STYLE_UNIT_ABOVE 0x20
182#define SG_DC_SCALE_STYLE_UNIT_BELOW 0x40
183
184//---------------------------------------------------------
185SAGA_API_DLL_EXPORT void SG_DC_Draw_Scale (wxDC &dc, const wxRect &r, double min_Value, double max_Value, int Orientation = SG_DC_SCALE_HORIZONTAL, int Tick = SG_DC_SCALE_TICK_NONE, int Style = SG_DC_SCALE_STYLE_DEFAULT, const wxString &Unit = "", bool bUseDCFont = false);
186SAGA_API_DLL_EXPORT void SG_DC_Draw_Scale (wxDC &dc, const wxRect &r, double min_Value, double max_Value, bool bHorizontal, bool bAscendent, bool bTickAtTop, const wxString &Unit = "", bool bUseDCFont = false);
187
188SAGA_API_DLL_EXPORT bool SG_DC_Draw_Ruler (wxDC &dc, const wxRect &r, bool bHorizontal, double zMin, double zMax, bool bAscendent = true, int FontSize = 7, const wxColour &Colour = wxColour(127, 127, 127));
189
190
192// //
193// //
194// //
196
197//---------------------------------------------------------
198#endif // #ifndef HEADER_INCLUDED__SAGA_API_dc_helper_H
#define SAGA_API_DLL_EXPORT
Definition api_core.h:94
#define SG_DC_SCALE_STYLE_DEFAULT
Definition dc_helper.h:176
SAGA_API_DLL_EXPORT bool SG_DC_Draw_Ruler(wxDC &dc, const wxRect &r, bool bHorizontal, double zMin, double zMax, bool bAscendent=true, int FontSize=7, const wxColour &Colour=wxColour(127, 127, 127))
#define SG_DC_SCALE_HORIZONTAL
Definition dc_helper.h:167
SAGA_API_DLL_EXPORT void SG_DC_Draw_Rect(wxDC &dc, wxColour Color, int ax, int ay, int bx, int by)
SAGA_API_DLL_EXPORT wxColour SG_Get_wxColor(int Color)
Definition dc_helper.cpp:70
#define SG_DC_SCALE_TICK_NONE
Definition dc_helper.h:171
SAGA_API_DLL_EXPORT wxFont SG_Get_wxFont(CSG_Parameter *pFont)
SAGA_API_DLL_EXPORT void SG_DC_Draw_Edge(wxDC &dc, int Edge_Style, int ax, int ay, int bx, int by)
SAGA_API_DLL_EXPORT wxColour SG_System_Get_Color_Foreground(int Mode=0)
@ SG_DC_EDGE_STYLE_SIMPLE
Definition dc_helper.h:98
@ SG_DC_EDGE_STYLE_SUNKEN
Definition dc_helper.h:100
@ SG_DC_EDGE_STYLE_RAISED
Definition dc_helper.h:101
@ SG_DC_EDGE_STYLE_STATIC
Definition dc_helper.h:99
SAGA_API_DLL_EXPORT void SG_DC_Draw_FillRect(wxDC &dc, wxColour Color, int ax, int ay, int bx, int by)
SAGA_API_DLL_EXPORT void SG_DC_Draw_Text(wxDC &dc, int Align, int x, int y, const wxString &Text)
SAGA_API_DLL_EXPORT wxColour SG_System_Get_Color(wxSystemColour index)
Definition dc_helper.cpp:81
SAGA_API_DLL_EXPORT bool SG_Set_Font(CSG_Parameter *pFont, wxFont &Font, wxColour &Colour)
SAGA_API_DLL_EXPORT void SG_DC_Draw_Scale(wxDC &dc, const wxRect &r, double min_Value, double max_Value, int Orientation=SG_DC_SCALE_HORIZONTAL, int Tick=SG_DC_SCALE_TICK_NONE, int Style=SG_DC_SCALE_STYLE_DEFAULT, const wxString &Unit="", bool bUseDCFont=false)
SAGA_API_DLL_EXPORT int SG_Get_Color(const wxColour &Color)
Definition dc_helper.cpp:64
SAGA_API_DLL_EXPORT wxColour SG_System_Get_Color_Background(int Mode=0)