SAGA API Version 9.14
Loading...
Searching...
No Matches
dc_helper.h File Reference
#include "parameters.h"
#include <wx/dc.h>
#include <wx/settings.h>

Go to the source code of this file.

Macros

#define SG_DC_TEXTALIGN_LEFT   0x01
#define SG_DC_TEXTALIGN_XCENTER   0x02
#define SG_DC_TEXTALIGN_RIGHT   0x04
#define SG_DC_TEXTALIGN_TOP   0x08
#define SG_DC_TEXTALIGN_YCENTER   0x10
#define SG_DC_TEXTALIGN_BOTTOM   0x20
#define SG_DC_TEXTALIGN_TOPLEFT   (SG_DC_TEXTALIGN_TOP |SG_DC_TEXTALIGN_LEFT)
#define SG_DC_TEXTALIGN_TOPCENTER   (SG_DC_TEXTALIGN_TOP |SG_DC_TEXTALIGN_XCENTER)
#define SG_DC_TEXTALIGN_TOPRIGHT   (SG_DC_TEXTALIGN_TOP |SG_DC_TEXTALIGN_RIGHT)
#define SG_DC_TEXTALIGN_CENTERLEFT   (SG_DC_TEXTALIGN_YCENTER|SG_DC_TEXTALIGN_LEFT)
#define SG_DC_TEXTALIGN_CENTER   (SG_DC_TEXTALIGN_YCENTER|SG_DC_TEXTALIGN_XCENTER)
#define SG_DC_TEXTALIGN_CENTERRIGHT   (SG_DC_TEXTALIGN_YCENTER|SG_DC_TEXTALIGN_RIGHT)
#define SG_DC_TEXTALIGN_BOTTOMLEFT   (SG_DC_TEXTALIGN_BOTTOM |SG_DC_TEXTALIGN_LEFT)
#define SG_DC_TEXTALIGN_BOTTOMCENTER   (SG_DC_TEXTALIGN_BOTTOM |SG_DC_TEXTALIGN_XCENTER)
#define SG_DC_TEXTALIGN_BOTTOMRIGHT   (SG_DC_TEXTALIGN_BOTTOM |SG_DC_TEXTALIGN_RIGHT)
#define SG_DC_TEXTEFFECT_NONE   0x00
#define SG_DC_TEXTEFFECT_TOP   0x01
#define SG_DC_TEXTEFFECT_TOPLEFT   0x02
#define SG_DC_TEXTEFFECT_LEFT   0x04
#define SG_DC_TEXTEFFECT_BOTTOMLEFT   0x08
#define SG_DC_TEXTEFFECT_BOTTOM   0x10
#define SG_DC_TEXTEFFECT_BOTTOMRIGHT   0x20
#define SG_DC_TEXTEFFECT_RIGHT   0x40
#define SG_DC_TEXTEFFECT_TOPRIGHT   0x80
#define SG_DC_TEXTEFFECT_FRAME   (SG_DC_TEXTEFFECT_TOPLEFT|SG_DC_TEXTEFFECT_BOTTOMLEFT|SG_DC_TEXTEFFECT_BOTTOMRIGHT|SG_DC_TEXTEFFECT_TOPRIGHT)
#define SG_DC_SCALE_HORIZONTAL   0x00
#define SG_DC_SCALE_VERTICAL   0x01
#define SG_DC_SCALE_TICK_NONE   0x00
#define SG_DC_SCALE_TICK_TOP   0x01
#define SG_DC_SCALE_TICK_BOTTOM   0x02
#define SG_DC_SCALE_STYLE_DEFAULT   0x00
#define SG_DC_SCALE_STYLE_DESCENDENT   0x02
#define SG_DC_SCALE_STYLE_LINECONN   0x04
#define SG_DC_SCALE_STYLE_BLACKWHITE   0x08
#define SG_DC_SCALE_STYLE_GLOOMING   0x10
#define SG_DC_SCALE_STYLE_UNIT_ABOVE   0x20
#define SG_DC_SCALE_STYLE_UNIT_BELOW   0x40

Enumerations

enum  { SG_DC_EDGE_STYLE_SIMPLE , SG_DC_EDGE_STYLE_STATIC , SG_DC_EDGE_STYLE_SUNKEN , SG_DC_EDGE_STYLE_RAISED }

Functions

SAGA_API_DLL_EXPORT wxColour SG_System_Get_Color (wxSystemColour index)
SAGA_API_DLL_EXPORT wxColour SG_System_Get_Color_Background (int Mode=0)
SAGA_API_DLL_EXPORT wxColour SG_System_Get_Color_Foreground (int Mode=0)
SAGA_API_DLL_EXPORT bool SG_Set_Font (CSG_Parameter *pFont, wxFont &Font, wxColour &Colour)
SAGA_API_DLL_EXPORT bool SG_Set_Font (const wxFont &Font, wxColour Colour, CSG_Parameter *pFont)
SAGA_API_DLL_EXPORT wxFont SG_Get_wxFont (CSG_Parameter *pFont)
SAGA_API_DLL_EXPORT int SG_Get_Color (const wxColour &Color)
SAGA_API_DLL_EXPORT wxColour SG_Get_wxColor (int Color)
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 void SG_DC_Draw_Edge (wxDC &dc, int Edge_Style, wxRect r)
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 void SG_DC_Draw_Rect (wxDC &dc, wxColour Color, wxRect r)
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_FillRect (wxDC &dc, wxColour Color, wxRect r)
SAGA_API_DLL_EXPORT void SG_DC_Draw_Text (wxDC &dc, int Align, int x, int y, const wxString &Text)
SAGA_API_DLL_EXPORT void SG_DC_Draw_Text (wxDC &dc, int Align, int x, int y, double Angle, const wxString &Text)
SAGA_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)
SAGA_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)
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 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)
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))

Macro Definition Documentation

◆ SG_DC_SCALE_HORIZONTAL

#define SG_DC_SCALE_HORIZONTAL   0x00

Definition at line 167 of file dc_helper.h.

Referenced by CMap_Canvas::Draw_ScaleBar(), and SG_DC_Draw_Scale().

◆ SG_DC_SCALE_STYLE_BLACKWHITE

#define SG_DC_SCALE_STYLE_BLACKWHITE   0x08

Definition at line 179 of file dc_helper.h.

Referenced by SG_DC_Draw_Scale().

◆ SG_DC_SCALE_STYLE_DEFAULT

#define SG_DC_SCALE_STYLE_DEFAULT   0x00

Definition at line 176 of file dc_helper.h.

Referenced by SG_DC_Draw_Scale().

◆ SG_DC_SCALE_STYLE_DESCENDENT

#define SG_DC_SCALE_STYLE_DESCENDENT   0x02

Definition at line 177 of file dc_helper.h.

Referenced by SG_DC_Draw_Scale(), and SG_DC_Draw_Scale().

◆ SG_DC_SCALE_STYLE_GLOOMING

#define SG_DC_SCALE_STYLE_GLOOMING   0x10

Definition at line 180 of file dc_helper.h.

Referenced by SG_DC_Draw_Scale().

◆ SG_DC_SCALE_STYLE_LINECONN

#define SG_DC_SCALE_STYLE_LINECONN   0x04

Definition at line 178 of file dc_helper.h.

Referenced by SG_DC_Draw_Scale().

◆ SG_DC_SCALE_STYLE_UNIT_ABOVE

#define SG_DC_SCALE_STYLE_UNIT_ABOVE   0x20

Definition at line 181 of file dc_helper.h.

◆ SG_DC_SCALE_STYLE_UNIT_BELOW

#define SG_DC_SCALE_STYLE_UNIT_BELOW   0x40

Definition at line 182 of file dc_helper.h.

Referenced by SG_DC_Draw_Scale().

◆ SG_DC_SCALE_TICK_BOTTOM

#define SG_DC_SCALE_TICK_BOTTOM   0x02

Definition at line 173 of file dc_helper.h.

Referenced by SG_DC_Draw_Scale(), and SG_DC_Draw_Scale().

◆ SG_DC_SCALE_TICK_NONE

#define SG_DC_SCALE_TICK_NONE   0x00

Definition at line 171 of file dc_helper.h.

Referenced by SG_DC_Draw_Scale().

◆ SG_DC_SCALE_TICK_TOP

#define SG_DC_SCALE_TICK_TOP   0x01

Definition at line 172 of file dc_helper.h.

Referenced by SG_DC_Draw_Scale(), and SG_DC_Draw_Scale().

◆ SG_DC_SCALE_VERTICAL

#define SG_DC_SCALE_VERTICAL   0x01

Definition at line 168 of file dc_helper.h.

Referenced by SG_DC_Draw_Scale(), and SG_DC_Draw_Scale().

◆ SG_DC_TEXTALIGN_BOTTOM

◆ SG_DC_TEXTALIGN_BOTTOMCENTER

#define SG_DC_TEXTALIGN_BOTTOMCENTER   (SG_DC_TEXTALIGN_BOTTOM |SG_DC_TEXTALIGN_XCENTER)

Definition at line 138 of file dc_helper.h.

Referenced by CSG_Map_Graticule::Draw(), and SG_DC_Draw_Scale().

◆ SG_DC_TEXTALIGN_BOTTOMLEFT

#define SG_DC_TEXTALIGN_BOTTOMLEFT   (SG_DC_TEXTALIGN_BOTTOM |SG_DC_TEXTALIGN_LEFT)

◆ SG_DC_TEXTALIGN_BOTTOMRIGHT

#define SG_DC_TEXTALIGN_BOTTOMRIGHT   (SG_DC_TEXTALIGN_BOTTOM |SG_DC_TEXTALIGN_RIGHT)

Definition at line 139 of file dc_helper.h.

◆ SG_DC_TEXTALIGN_CENTER

◆ SG_DC_TEXTALIGN_CENTERLEFT

◆ SG_DC_TEXTALIGN_CENTERRIGHT

#define SG_DC_TEXTALIGN_CENTERRIGHT   (SG_DC_TEXTALIGN_YCENTER|SG_DC_TEXTALIGN_RIGHT)

Definition at line 136 of file dc_helper.h.

Referenced by CSG_Map_Graticule::Draw().

◆ SG_DC_TEXTALIGN_LEFT

#define SG_DC_TEXTALIGN_LEFT   0x01

◆ SG_DC_TEXTALIGN_RIGHT

#define SG_DC_TEXTALIGN_RIGHT   0x04

◆ SG_DC_TEXTALIGN_TOP

◆ SG_DC_TEXTALIGN_TOPCENTER

#define SG_DC_TEXTALIGN_TOPCENTER   (SG_DC_TEXTALIGN_TOP |SG_DC_TEXTALIGN_XCENTER)

◆ SG_DC_TEXTALIGN_TOPLEFT

◆ SG_DC_TEXTALIGN_TOPRIGHT

#define SG_DC_TEXTALIGN_TOPRIGHT   (SG_DC_TEXTALIGN_TOP |SG_DC_TEXTALIGN_RIGHT)

Definition at line 133 of file dc_helper.h.

◆ SG_DC_TEXTALIGN_XCENTER

#define SG_DC_TEXTALIGN_XCENTER   0x02

◆ SG_DC_TEXTALIGN_YCENTER

◆ SG_DC_TEXTEFFECT_BOTTOM

◆ SG_DC_TEXTEFFECT_BOTTOMLEFT

◆ SG_DC_TEXTEFFECT_BOTTOMRIGHT

◆ SG_DC_TEXTEFFECT_FRAME

◆ SG_DC_TEXTEFFECT_LEFT

◆ SG_DC_TEXTEFFECT_NONE

#define SG_DC_TEXTEFFECT_NONE   0x00

◆ SG_DC_TEXTEFFECT_RIGHT

◆ SG_DC_TEXTEFFECT_TOP

◆ SG_DC_TEXTEFFECT_TOPLEFT

◆ SG_DC_TEXTEFFECT_TOPRIGHT

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
SG_DC_EDGE_STYLE_SIMPLE 
SG_DC_EDGE_STYLE_STATIC 
SG_DC_EDGE_STYLE_SUNKEN 
SG_DC_EDGE_STYLE_RAISED 

Definition at line 96 of file dc_helper.h.

Function Documentation

◆ SG_DC_Draw_Edge() [1/2]

◆ SG_DC_Draw_Edge() [2/2]

SAGA_API_DLL_EXPORT void SG_DC_Draw_Edge ( wxDC & dc,
int Edge_Style,
wxRect r )

Definition at line 247 of file dc_helper.cpp.

References SG_DC_Draw_Edge().

◆ SG_DC_Draw_FillRect() [1/2]

SAGA_API_DLL_EXPORT void SG_DC_Draw_FillRect ( wxDC & dc,
wxColour Color,
int ax,
int ay,
int bx,
int by )

Definition at line 281 of file dc_helper.cpp.

Referenced by SG_DC_Draw_FillRect(), and SG_DC_Draw_Rect().

◆ SG_DC_Draw_FillRect() [2/2]

SAGA_API_DLL_EXPORT void SG_DC_Draw_FillRect ( wxDC & dc,
wxColour Color,
wxRect r )

Definition at line 316 of file dc_helper.cpp.

References SG_DC_Draw_FillRect().

◆ SG_DC_Draw_Rect() [1/2]

SAGA_API_DLL_EXPORT void SG_DC_Draw_Rect ( wxDC & dc,
wxColour Color,
int ax,
int ay,
int bx,
int by )

Definition at line 260 of file dc_helper.cpp.

References SG_DC_Draw_Edge(), SG_DC_Draw_FillRect(), and SG_DC_EDGE_STYLE_SIMPLE.

Referenced by SG_DC_Draw_Rect().

◆ SG_DC_Draw_Rect() [2/2]

SAGA_API_DLL_EXPORT void SG_DC_Draw_Rect ( wxDC & dc,
wxColour Color,
wxRect r )

Definition at line 268 of file dc_helper.cpp.

References SG_DC_Draw_Rect().

◆ SG_DC_Draw_Ruler()

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) )

Definition at line 664 of file dc_helper.cpp.

References Extent, and RULER_TEXT_SPACE.

◆ SG_DC_Draw_Scale() [1/2]

SAGA_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 )

◆ SG_DC_Draw_Scale() [2/2]

◆ SG_DC_Draw_Text() [1/4]

◆ SG_DC_Draw_Text() [2/4]

SAGA_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 )

Definition at line 410 of file dc_helper.cpp.

References SG_DC_Draw_Text().

◆ SG_DC_Draw_Text() [3/4]

SAGA_API_DLL_EXPORT void SG_DC_Draw_Text ( wxDC & dc,
int Align,
int x,
int y,
double Angle,
const wxString & Text )

◆ SG_DC_Draw_Text() [4/4]

SAGA_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 )

◆ SG_Get_Color()

SAGA_API_DLL_EXPORT int SG_Get_Color ( const wxColour & Color)

◆ SG_Get_wxColor()

◆ SG_Get_wxFont()

SAGA_API_DLL_EXPORT wxFont SG_Get_wxFont ( CSG_Parameter * pFont)

Definition at line 169 of file dc_helper.cpp.

References SG_Set_Font().

Referenced by CSG_Map_Graticule::Draw(), and CSG_Map_Shapes::On_Draw().

◆ SG_Set_Font() [1/2]

SAGA_API_DLL_EXPORT bool SG_Set_Font ( const wxFont & Font,
wxColour Colour,
CSG_Parameter * pFont )

◆ SG_Set_Font() [2/2]

SAGA_API_DLL_EXPORT bool SG_Set_Font ( CSG_Parameter * pFont,
wxFont & Font,
wxColour & Colour )

◆ SG_System_Get_Color()

SAGA_API_DLL_EXPORT wxColour SG_System_Get_Color ( wxSystemColour index)

◆ SG_System_Get_Color_Background()

SAGA_API_DLL_EXPORT wxColour SG_System_Get_Color_Background ( int Mode = 0)

Definition at line 102 of file dc_helper.cpp.

References SG_System_Get_Color().

Referenced by CSG_Map_Shapes::Add_Parameters().

◆ SG_System_Get_Color_Foreground()

SAGA_API_DLL_EXPORT wxColour SG_System_Get_Color_Foreground ( int Mode = 0)

Definition at line 113 of file dc_helper.cpp.

References SG_System_Get_Color().

Referenced by CSG_Map_Shapes::Add_Parameters().