87 PenList_Add(Parameters,
"NODE_DISPLAY" ,
"LINE_STYLE" ,
_TL(
"Line Style" ),
_TL(
""));
109 Parameters.
Add_Range (
"SIZE_FIELD",
"SIZE_RANGE" ,
_TL(
"Size Range" ),
_TL(
""), 0, 10, 0,
true);
110 Parameters.
Add_Int (
"SIZE_FIELD",
"SIZE_DEFAULT",
_TL(
"Default Size" ),
_TL(
""), 1, 1,
true );
117 _TL(
"one label at the polyline centroid"),
118 _TL(
"one label at the central vertex of each part"),
119 _TL(
"one aligned label at the central vertex of each part"),
120 _TL(
"along line labeling")), 3
125 Parameters.
Add_Double(
"LABEL_STYLE",
"LABEL_FREQUENCY",
_TL(
"Along Line Frequency"),
_TL(
"The distance between labels specified as multiples of the label's text width."), 10., 0.,
true);
146 Parameters.
Set_Enabled(
"SIZE_DEFAULT" , Value < 0);
283 _Draw_Shape(dc_Map, pShape);
316 default: Size *= dc_Map.
Scale() ;
break;
317 case 1: Size *= dc_Map.
World2DC();
break;
320 Pen.SetWidth(Size < 0 ? 0 : (
int)(0.5 + Size));
336 Pen.SetColour(Color);
342 _Draw_Shape(dc_Map, pShape);
348void CSG_Map_Shapes_Line::_Draw_Shape(
CSG_Map_DC &dc_Map,
CSG_Shape *pShape,
int xOffset,
int yOffset)
367#define GET_ANGLE(a, b) M_RAD_TO_DEG * (b.x != a.x ? M_PI_180 - atan2((double)(b.y - a.y), (double)(b.x - a.x)) : (b.y > a.y ? M_PI_270 : (b.y < a.y ? M_PI_090 : 0.0)))
391 double d = 0., c = 0.5 * pLine->
Get_Length(iPart);
404 A.x += 0.5 * (
B.x -
A.x);
405 A.y += 0.5 * (
B.y -
A.y);
434 wxCoord Width, Height; dc_Map.
Get_DC().GetTextExtent(Label, &Width, &Height);
454 B =
A; bLabel =
true;
465 d = 0.; bLabel =
false;
#define SG_GET_RGB(r, g, b)
void SetPen(const wxPen &Pen)
void DrawLine(int x1, int y1, int x2, int y2)
wxMemoryDC & Get_DC(void)
const double & Scale(void) const
const double & World2DC(void) const
void DrawText(int Align, int x, int y, const wxString &Text)
bool Set_Fields_Choice(CSG_Parameter &Choice, bool bNumeric, bool bAddNone, bool bSelectNone=false)
static int Get_Fields_Choice(CSG_Parameter &Choice)
CSG_Data_Object * m_pObject
bool Set_Object(CSG_Data_Object *pObject)
CSG_Parameters m_Parameters
class CSG_Map_Symbology * m_pSymbology
bool Get_Style_Size(int &min_Size, int &max_Size, double &min_Value, double &dValue, wxString *pName)
virtual void Draw_Label(CSG_Map_DC &dc_Map, CSG_Shape *pShape, const wxString &Label)
virtual bool Parameters_Changed(void)
virtual bool Parameter_Changed(CSG_Parameters &Parameters, CSG_Parameter &Parameter, int Flags)
virtual void Draw_Initialize(CSG_Map_DC &dc_Map, int Flags)
virtual void Draw_Shape(CSG_Map_DC &dc_Map, CSG_Shape *pShape, int Flags=0)
virtual bool DataObject_Changed(void)
virtual bool Add_Parameters(CSG_Parameters &Parameters)
CSG_Map_Shapes_Line(CSG_Shapes *pShapes=NULL)
virtual bool Add_Parameters(CSG_Parameters &Parameters)
virtual bool Parameter_Changed(CSG_Parameters &Parameters, CSG_Parameter &Parameter, int Flags)
bool Get_Class_Color(CSG_Shape *pShape, int &Color)
class CSG_Map_Shapes::CLabel m_Label
int PenList_Get_Style(const CSG_String &Identifier)
CSG_Parameter * PenList_Add(CSG_Parameters &Parameters, const CSG_String &ParentID, const CSG_String &Identifier, const CSG_String &Name, const CSG_String &Description) const
virtual bool Parameters_Changed(void)
virtual bool DataObject_Changed(void)
bool Cmp_Identifier(const CSG_String &Identifier) const
CSG_Parameter * Add_Choice(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, const CSG_String &Items, int Default=0)
void Set_Enabled(bool bEnabled=true)
CSG_Parameter * Add_Double(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, double Value=0.0, double Minimum=0.0, bool bMinimum=false, double Maximum=0.0, bool bMaximum=false)
CSG_Parameter * Add_Int(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Value=0, int Minimum=0, bool bMinimum=false, int Maximum=0, bool bMaximum=false)
CSG_Parameter * Add_Color(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Value=0)
CSG_Parameter * Add_Range(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, double Range_Min=0.0, double Range_Max=0.0, double Minimum=0.0, bool bMinimum=false, double Maximum=0.0, bool bMaximum=false)
virtual TSG_Point Get_Centroid(void)
virtual TSG_Point Get_Point(int iPoint=0) const
virtual int Get_Part_Count(void) const
virtual int Get_Point_Count(void) const
virtual int Get_Point_Count(void) const =0
virtual int Get_Part_Count(void) const =0
virtual TSG_Point Get_Point(int iPoint=0) const =0
virtual TSG_Shape_Type Get_Type(void) const
static CSG_String Format(const char *Format,...)
bool is_NoData(int Field) const
double asDouble(int Field) const
#define SG_DC_TEXTEFFECT_TOPRIGHT
#define SG_DC_TEXTEFFECT_LEFT
#define SG_DC_TEXTALIGN_CENTER
#define SG_DC_TEXTALIGN_BOTTOMLEFT
#define SG_DC_TEXTEFFECT_BOTTOM
#define SG_DC_TEXTEFFECT_NONE
#define SG_DC_TEXTEFFECT_BOTTOMRIGHT
#define SG_DC_TEXTEFFECT_TOPLEFT
#define SG_DC_TEXTEFFECT_BOTTOMLEFT
#define SG_DC_TEXTALIGN_TOPLEFT
#define SG_DC_TEXTEFFECT_RIGHT
#define SG_DC_TEXTEFFECT_TOP
#define SG_DC_TEXTEFFECT_FRAME
#define SG_DC_TEXTALIGN_CENTERLEFT
double SG_Get_Distance(double ax, double ay, double bx, double by, bool bPolar)
#define LAYER_DRAW_FLAG_SELECTION
#define PARAMETER_CHECK_ENABLE
CSG_String SG_Get_ShapeType_Name(TSG_Shape_Type Type)