Go to the documentation of this file.
30 #ifndef OGR_FEATURESTYLE_INCLUDE
31 #define OGR_FEATURESTYLE_INCLUDE
60 typedef struct ogr_style_param
68 typedef struct ogr_style_value
87 char **m_papszStyleTable;
95 GBool AddStyle(
const char *pszName,
const char *pszStyleString);
96 GBool RemoveStyle(
const char *pszName);
97 GBool ModifyStyle(
const char *pszName,
const char *pszStyleString);
99 GBool SaveStyleTable(
const char *pszFilename);
100 GBool LoadStyleTable(
const char *pszFilename);
101 const char *Find(
const char *pszStyleString);
102 GBool IsExist(
const char *pszName);
103 const char *GetStyleName(
const char *pszName);
104 void Print(FILE *fpOut);
107 void ResetStyleStringReading();
108 const char *GetNextStyle();
109 const char *GetLastStyleName();
121 char *m_pszStyleString;
127 GBool SetFeatureStyleString(
OGRFeature *,
const char *pszStyleString=
nullptr,
128 GBool bNoMatching = FALSE);
134 GBool InitStyleString(
const char *pszStyleString =
nullptr);
136 const char *GetStyleName(
const char *pszStyleString=
nullptr);
137 const char *GetStyleByName(
const char *pszStyleName);
139 GBool AddStyle(
const char *pszStyleName,
const char *pszStyleString=
nullptr);
141 const char *GetStyleString(
OGRFeature * =
nullptr);
144 GBool AddPart(
const char *);
146 int GetPartCount(
const char *pszStyleString =
nullptr);
147 OGRStyleTool *GetPart(
int hPartId,
const char *pszStyleString =
nullptr);
152 OGRStyleTable *GetDataSetStyleTable(){
return m_poDataSetStyleTable;}
154 OGRStyleTool *CreateStyleToolFromStyleString(
const char *pszStyleString);
169 char *m_pszStyleString;
171 virtual GBool Parse() = 0;
175 GBool Parse(
const OGRStyleParamId* pasStyle,
176 OGRStyleValue* pasValue,
188 m_pszStyleString(
nullptr)
193 static GBool GetRGBFromString(
const char *pszColor,
int &nRed,
int &nGreen,
194 int &nBlue,
int &nTransparence);
195 static int GetSpecificId(
const char *pszId,
const char *pszWanted);
198 GBool IsStyleModified() {
return m_bModified;}
199 void StyleModified() {m_bModified = TRUE;}
201 GBool IsStyleParsed() {
return m_bParsed;}
202 void StyleParsed() {m_bParsed = TRUE;}
208 void SetInternalInputUnitFromParam(
char *pszString);
220 virtual const char *GetStyleString() = 0;
221 void SetStyleString(
const char *pszStyleString);
222 const char *GetStyleString(
const OGRStyleParamId *pasStyleParam ,
223 OGRStyleValue *pasStyleValue,
int nSize);
225 const char *GetParamStr(
const OGRStyleParamId &sStyleParam ,
226 OGRStyleValue &sStyleValue,
227 GBool &bValueIsNull);
229 int GetParamNum(
const OGRStyleParamId &sStyleParam ,
230 OGRStyleValue &sStyleValue,
231 GBool &bValueIsNull);
233 double GetParamDbl(
const OGRStyleParamId &sStyleParam ,
234 OGRStyleValue &sStyleValue,
235 GBool &bValueIsNull);
237 void SetParamStr(
const OGRStyleParamId &sStyleParam ,
238 OGRStyleValue &sStyleValue,
239 const char *pszParamString);
241 void SetParamNum(
const OGRStyleParamId &sStyleParam ,
242 OGRStyleValue &sStyleValue,
245 void SetParamDbl(
const OGRStyleParamId &sStyleParam ,
246 OGRStyleValue &sStyleValue,
263 OGRStyleValue *m_pasStyleValue;
265 GBool Parse()
override;
270 ~OGRStylePen()
override;
311 OGRStyleValue *m_pasStyleValue;
313 GBool Parse()
override;
318 ~OGRStyleBrush()
override;
357 OGRStyleValue *m_pasStyleValue;
359 GBool Parse()
override;
364 ~OGRStyleSymbol()
override;
411 OGRStyleValue *m_pasStyleValue;
413 GBool Parse()
override;
418 ~OGRStyleLabel()
override;
@ OGRSTSymbolStep
Definition: ogr_core.h:868
@ OGRSTLabelStretch
Definition: ogr_core.h:900
enum ogr_style_type OGRSType
@ OGRSTBrushSize
Definition: ogr_core.h:847
@ OGRSTLabelStrikeout
Definition: ogr_core.h:899
@ OGRSTLabelPerp
Definition: ogr_core.h:894
@ OGRSTSymbolPriority
Definition: ogr_core.h:871
@ OGRSTLabelBColor
Definition: ogr_core.h:889
@ OGRSTLabelFColor
Definition: ogr_core.h:888
Definition: ogr_featurestyle.h:84
enum ogr_style_tool_class_id OGRSTClassId
enum ogr_style_tool_param_brush_id OGRSTBrushParam
@ OGRSTLabelItalic
Definition: ogr_core.h:896
@ OGRSTPenWidth
Definition: ogr_core.h:826
enum ogr_style_tool_param_label_id OGRSTLabelParam
@ OGRSTLabelTextString
Definition: ogr_core.h:886
Convenient string class based on std::string.
Definition: cpl_string.h:336
enum ogr_style_tool_param_pen_id OGRSTPenParam
@ OGRSTLabelPlacement
Definition: ogr_core.h:890
enum ogr_style_tool_units_id OGRSTUnitId
@ OGRSTCNone
Definition: ogr_core.h:799
@ OGRSTPenPriority
Definition: ogr_core.h:832
@ OGRSTSymbolDx
Definition: ogr_core.h:866
@ OGRSTLabelOColor
Definition: ogr_core.h:904
@ OGRSTSymbolAngle
Definition: ogr_core.h:863
@ OGRSTPenColor
Definition: ogr_core.h:825
@ OGRSTLabelDy
Definition: ogr_core.h:893
ogr_style_type
Definition: ogr_featurestyle.h:50
@ OGRSTLabelFontName
Definition: ogr_core.h:884
@ OGRSTLabelPriority
Definition: ogr_core.h:898
@ OGRSTLabelUnderline
Definition: ogr_core.h:897
@ OGRSTLabelAnchor
Definition: ogr_core.h:891
@ OGRSTLabelAngle
Definition: ogr_core.h:887
@ OGRSTSymbolDy
Definition: ogr_core.h:867
@ OGRSTBrushDx
Definition: ogr_core.h:848
enum ogr_style_tool_param_symbol_id OGRSTSymbolParam
@ OGRSTBrushFColor
Definition: ogr_core.h:843
@ OGRSTBrushDy
Definition: ogr_core.h:849
@ OGRSTSymbolId
Definition: ogr_core.h:862
@ OGRSTBrushBColor
Definition: ogr_core.h:844
Definition: ogr_featurestyle.h:117
@ OGRSTUGround
Definition: ogr_core.h:812
@ OGRSTSymbolSize
Definition: ogr_core.h:865
@ OGRSTLabelHColor
Definition: ogr_core.h:903
@ OGRSTSymbolOffset
Definition: ogr_core.h:870
@ OGRSTBrushId
Definition: ogr_core.h:845
@ OGRSTPenCap
Definition: ogr_core.h:830
Definition: ogr_feature.h:353
@ OGRSTPenPerOffset
Definition: ogr_core.h:829
@ OGRSTBrushPriority
Definition: ogr_core.h:850
@ OGRSTPenJoin
Definition: ogr_core.h:831
int GBool
Definition: cpl_port.h:221
@ OGRSTSymbolColor
Definition: ogr_core.h:864
@ OGRSTSymbolOColor
Definition: ogr_core.h:873
@ OGRSTLabelDx
Definition: ogr_core.h:892
@ OGRSTPenId
Definition: ogr_core.h:828
@ OGRSTSymbolPerp
Definition: ogr_core.h:869
@ OGRSTBrushAngle
Definition: ogr_core.h:846
@ OGRSTPenPattern
Definition: ogr_core.h:827
@ OGRSTLabelSize
Definition: ogr_core.h:885
@ OGRSTLabelBold
Definition: ogr_core.h:895
Generated for GDAL by
1.8.17.