SAGA API Version 9.14
Loading...
Searching...
No Matches
CSG_Map_DC Class Reference

#include <map_dc.h>

Public Types

enum class  Mode { Opaque = 0 , Transparent , Alpha , Shade }

Public Member Functions

 CSG_Map_DC (void)
virtual ~CSG_Map_DC (void)
bool Destroy (void)
 CSG_Map_DC (const CSG_Rect &rWorld, const CSG_Rect_Int &rDC, double Scale=1., int Background=-1, bool bAlpha=false)
bool Create (const CSG_Rect &rWorld, const CSG_Rect_Int &rDC, double Scale=1., int Background=-1, bool bAlpha=false)
 CSG_Map_DC (const CSG_Rect &rWorld, const wxRect &rDC, double Scale=1., int Background=-1, bool bAlpha=false)
bool Create (const CSG_Rect &rWorld, const wxRect &rDC, double Scale=1., int Background=-1, bool bAlpha=false)
wxMemoryDC & Get_DC (void)
int Get_Background (void) const
bool has_Alpha (void) const
void SetFont (const wxFont &Font)
void SetPen (const wxPen &Pen)
void SetBrush (const wxBrush &Brush)
void DrawPoint (int x, int y)
void DrawLine (int x1, int y1, int x2, int y2)
void DrawRectangle (int x1, int y1, int width, int height)
void DrawRectangle (const wxRect &r)
void DrawCircle (int x, int y, int radius)
void DrawArc (int xStart, int yStart, int xEnd, int yEnd, int xc, int yc)
void DrawPolygon (int n, const wxPoint points[], int xoffset=0, int yoffset=0, wxPolygonFillMode fill_style=wxODDEVEN_RULE)
void DrawPolyPolygon (int n, const int count[], const wxPoint points[], int xoffset=0, int yoffset=0, wxPolygonFillMode fill_style=wxODDEVEN_RULE)
void DrawBitmap (const wxBitmap &bitmap, int x, int y, bool useAlpha=false)
void DrawText (int Align, int x, int y, const wxString &Text)
void DrawText (int Align, int x, int y, double Angle, const wxString &Text)
void DrawText (int Align, int x, int y, const wxString &Text, int Effect, wxColour Effect_Color, int Effect_Size=1)
void DrawText (int Align, int x, int y, double Angle, const wxString &Text, int Effect, wxColour Effect_Color, int Effect_Size=1)
const double & Scale (void) const
const CSG_Rect & rWorld (void) const
const int & DC_Width (void) const
const int & DC_Height (void) const
const wxRect & rDC (void) const
const double & World2DC (void) const
TSG_Point_Int World2DC (const CSG_Point &p)
double xWorld2DC (double x, bool bRound=true)
double yWorld2DC (double y, bool bRound=true)
const double & DC2World (void) const
double xDC2World (double x)
double yDC2World (double y)
void Set_Font (wxFont &Font)
wxBitmap Get_Bitmap (void)
bool Get_Bitmap (wxBitmap &Bitmap)
bool Get_Image (wxImage &Image)
bool Get_Image (CSG_Grid &Image)
bool Draw_Layer_Begin (void)
bool Draw_Layer_End (double Transparency=0.)
void Draw_Polygon (CSG_Shape_Polygon *pPolygon)
bool Draw_Image_Begin (double Transparency, Mode Mode=Mode::Transparent)
bool Draw_Image_End (void)
void Draw_Image_Pixels (int x1, int y1, int x2, int y2, int Color)
void Draw_Image_Pixel (int x, int y, int Color)

Detailed Description

Definition at line 74 of file map_dc.h.

Member Enumeration Documentation

◆ Mode

enum class CSG_Map_DC::Mode
strong
Enumerator
Opaque 
Transparent 
Alpha 
Shade 

Definition at line 90 of file map_dc.h.

Constructor & Destructor Documentation

◆ CSG_Map_DC() [1/3]

CSG_Map_DC::CSG_Map_DC ( void )

Definition at line 62 of file map_dc.cpp.

◆ ~CSG_Map_DC()

CSG_Map_DC::~CSG_Map_DC ( void )
virtual

Definition at line 80 of file map_dc.cpp.

References Destroy().

◆ CSG_Map_DC() [2/3]

CSG_Map_DC::CSG_Map_DC ( const CSG_Rect & rWorld,
const CSG_Rect_Int & rDC,
double Scale = 1.,
int Background = -1,
bool bAlpha = false )

Definition at line 74 of file map_dc.cpp.

References Create(), rDC(), rWorld(), and Scale().

◆ CSG_Map_DC() [3/3]

CSG_Map_DC::CSG_Map_DC ( const CSG_Rect & rWorld,
const wxRect & rDC,
double Scale = 1.,
int Background = -1,
bool bAlpha = false )

Definition at line 68 of file map_dc.cpp.

References Create(), rDC(), rWorld(), and Scale().

Member Function Documentation

◆ Create() [1/2]

bool CSG_Map_DC::Create ( const CSG_Rect & rWorld,
const CSG_Rect_Int & rDC,
double Scale = 1.,
int Background = -1,
bool bAlpha = false )

Definition at line 91 of file map_dc.cpp.

References Create(), rDC(), rWorld(), and Scale().

Referenced by Create(), CSG_Map_DC(), and CSG_Map_DC().

◆ Create() [2/2]

bool CSG_Map_DC::Create ( const CSG_Rect & rWorld,
const wxRect & rDC,
double Scale = 1.,
int Background = -1,
bool bAlpha = false )

Definition at line 97 of file map_dc.cpp.

References Destroy(), rDC(), rWorld(), Scale(), SG_GET_B, SG_GET_G, and SG_GET_R.

◆ DC2World()

const double & CSG_Map_DC::DC2World ( void ) const
inline

Definition at line 154 of file map_dc.h.

Referenced by CSG_Map_BaseMap::Draw(), CSG_Map_Grid::On_Draw(), and CSG_Map_Grids::On_Draw().

◆ DC_Height()

const int & CSG_Map_DC::DC_Height ( void ) const
inline

Definition at line 127 of file map_dc.h.

◆ DC_Width()

const int & CSG_Map_DC::DC_Width ( void ) const
inline

Definition at line 126 of file map_dc.h.

◆ Destroy()

bool CSG_Map_DC::Destroy ( void )

Definition at line 150 of file map_dc.cpp.

Referenced by Create(), and ~CSG_Map_DC().

◆ Draw_Image_Begin()

bool CSG_Map_DC::Draw_Image_Begin ( double Transparency,
Mode Mode = Mode::Transparent )

◆ Draw_Image_End()

bool CSG_Map_DC::Draw_Image_End ( void )

◆ Draw_Image_Pixel()

void CSG_Map_DC::Draw_Image_Pixel ( int x,
int y,
int Color )
inline

Definition at line 186 of file map_dc.h.

Referenced by CSG_Map_BaseMap::Draw().

◆ Draw_Image_Pixels()

void CSG_Map_DC::Draw_Image_Pixels ( int x1,
int y1,
int x2,
int y2,
int Color )

Definition at line 433 of file map_dc.cpp.

◆ Draw_Layer_Begin()

bool CSG_Map_DC::Draw_Layer_Begin ( void )

Definition at line 271 of file map_dc.cpp.

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

◆ Draw_Layer_End()

bool CSG_Map_DC::Draw_Layer_End ( double Transparency = 0.)

Definition at line 290 of file map_dc.cpp.

References Draw_Image_Begin(), and Draw_Image_End().

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

◆ Draw_Polygon()

◆ DrawArc()

void CSG_Map_DC::DrawArc ( int xStart,
int yStart,
int xEnd,
int yEnd,
int xc,
int yc )

Definition at line 567 of file map_dc.cpp.

◆ DrawBitmap()

void CSG_Map_DC::DrawBitmap ( const wxBitmap & bitmap,
int x,
int y,
bool useAlpha = false )

Definition at line 600 of file map_dc.cpp.

Referenced by CSG_Map_Shapes_Point::Draw_Shape().

◆ DrawCircle()

void CSG_Map_DC::DrawCircle ( int x,
int y,
int radius )

Definition at line 556 of file map_dc.cpp.

Referenced by CSG_Map_Shapes_Polygon::Draw_Shape().

◆ DrawLine()

void CSG_Map_DC::DrawLine ( int x1,
int y1,
int x2,
int y2 )

Definition at line 524 of file map_dc.cpp.

Referenced by CSG_Map_Graticule::Draw().

◆ DrawPoint()

void CSG_Map_DC::DrawPoint ( int x,
int y )

Definition at line 513 of file map_dc.cpp.

Referenced by Draw_Polygon(), and CSG_Map_Shapes_Polygon::Draw_Thumbnails().

◆ DrawPolygon()

void CSG_Map_DC::DrawPolygon ( int n,
const wxPoint points[],
int xoffset = 0,
int yoffset = 0,
wxPolygonFillMode fill_style = wxODDEVEN_RULE )

Definition at line 578 of file map_dc.cpp.

Referenced by Draw_Polygon().

◆ DrawPolyPolygon()

void CSG_Map_DC::DrawPolyPolygon ( int n,
const int count[],
const wxPoint points[],
int xoffset = 0,
int yoffset = 0,
wxPolygonFillMode fill_style = wxODDEVEN_RULE )

Definition at line 589 of file map_dc.cpp.

Referenced by Draw_Polygon().

◆ DrawRectangle() [1/2]

void CSG_Map_DC::DrawRectangle ( const wxRect & r)

Definition at line 545 of file map_dc.cpp.

◆ DrawRectangle() [2/2]

void CSG_Map_DC::DrawRectangle ( int x1,
int y1,
int width,
int height )

Definition at line 535 of file map_dc.cpp.

Referenced by CSG_Map_Shapes_Point::Draw_Shape().

◆ DrawText() [1/4]

void CSG_Map_DC::DrawText ( int Align,
int x,
int y,
const wxString & Text )

◆ DrawText() [2/4]

void CSG_Map_DC::DrawText ( int Align,
int x,
int y,
const wxString & Text,
int Effect,
wxColour Effect_Color,
int Effect_Size = 1 )

Definition at line 638 of file map_dc.cpp.

References SG_DC_Draw_Text().

◆ DrawText() [3/4]

void CSG_Map_DC::DrawText ( int Align,
int x,
int y,
double Angle,
const wxString & Text )

Definition at line 627 of file map_dc.cpp.

References SG_DC_Draw_Text().

◆ DrawText() [4/4]

void CSG_Map_DC::DrawText ( int Align,
int x,
int y,
double Angle,
const wxString & Text,
int Effect,
wxColour Effect_Color,
int Effect_Size = 1 )

Definition at line 649 of file map_dc.cpp.

References SG_DC_Draw_Text().

◆ Get_Background()

int CSG_Map_DC::Get_Background ( void ) const

Definition at line 165 of file map_dc.cpp.

References SG_Get_Color().

◆ Get_Bitmap() [1/2]

wxBitmap CSG_Map_DC::Get_Bitmap ( void )

◆ Get_Bitmap() [2/2]

bool CSG_Map_DC::Get_Bitmap ( wxBitmap & Bitmap)

Definition at line 177 of file map_dc.cpp.

References Get_Image().

◆ Get_DC()

wxMemoryDC & CSG_Map_DC::Get_DC ( void )
inline

◆ Get_Image() [1/2]

bool CSG_Map_DC::Get_Image ( CSG_Grid & Image)

◆ Get_Image() [2/2]

bool CSG_Map_DC::Get_Image ( wxImage & Image)

◆ has_Alpha()

bool CSG_Map_DC::has_Alpha ( void ) const
inline

Definition at line 100 of file map_dc.h.

◆ rDC()

const wxRect & CSG_Map_DC::rDC ( void ) const
inline

◆ rWorld()

◆ Scale()

const double & CSG_Map_DC::Scale ( void ) const
inline

◆ Set_Font()

void CSG_Map_DC::Set_Font ( wxFont & Font)

Definition at line 460 of file map_dc.cpp.

References SetFont().

◆ SetBrush()

◆ SetFont()

void CSG_Map_DC::SetFont ( const wxFont & Font)

Definition at line 471 of file map_dc.cpp.

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

◆ SetPen()

◆ World2DC() [1/2]

TSG_Point_Int CSG_Map_DC::World2DC ( const CSG_Point & p)
inline

◆ World2DC() [2/2]

◆ xDC2World()

double CSG_Map_DC::xDC2World ( double x)
inline

Definition at line 156 of file map_dc.h.

◆ xWorld2DC()

double CSG_Map_DC::xWorld2DC ( double x,
bool bRound = true )
inline

Definition at line 140 of file map_dc.h.

Referenced by Draw_Polygon(), CSG_Map_Shapes_Polygon::Draw_Shape(), and World2DC().

◆ yDC2World()

double CSG_Map_DC::yDC2World ( double y)
inline

Definition at line 161 of file map_dc.h.

◆ yWorld2DC()

double CSG_Map_DC::yWorld2DC ( double y,
bool bRound = true )
inline

Definition at line 147 of file map_dc.h.

Referenced by Draw_Polygon(), CSG_Map_Shapes_Polygon::Draw_Shape(), and World2DC().


The documentation for this class was generated from the following files: