本文整理汇总了C++中symbolizers类的典型用法代码示例。如果您正苦于以下问题:C++ symbolizers类的具体用法?C++ symbolizers怎么用?C++ symbolizers使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了symbolizers类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: rule
rule(const rule& rhs, bool deep_copy = false)
: name_(rhs.name_),
title_(rhs.title_),
abstract_(rhs.abstract_),
min_scale_(rhs.min_scale_),
max_scale_(rhs.max_scale_),
syms_(rhs.syms_),
filter_(rhs.filter_),
else_filter_(rhs.else_filter_),
also_filter_(rhs.also_filter_)
{
if (deep_copy) {
//std::string expr = to_expression_string(rhs.filter_);
//filter_ = parse_expression(expr,"utf8");
symbolizers::iterator it = syms_.begin(),
end = syms_.end();
// FIXME - metawriter_ptr?
for(; it != end; ++it) {
/*if (polygon_symbolizer *sym = boost::get<polygon_symbolizer>(&(*it))) {
// no shared pointers
} else if (line_symbolizer *sym = boost::get<line_symbolizer>(&(*it))) {
// no shared pointers
} else if (building_symbolizer *sym = boost::get<building_symbolizer>(&(*it))) {
// no shared pointers
}*/
if (markers_symbolizer *sym = boost::get<markers_symbolizer>(&(*it))) {
copy_path_ptr(sym);
} else if (point_symbolizer *sym = boost::get<point_symbolizer>(&(*it))) {
copy_path_ptr(sym);
} else if (polygon_pattern_symbolizer *sym = boost::get<polygon_pattern_symbolizer>(&(*it))) {
copy_path_ptr(sym);
} else if (line_pattern_symbolizer *sym = boost::get<line_pattern_symbolizer>(&(*it))) {
copy_path_ptr(sym);
} else if (raster_symbolizer *sym = boost::get<raster_symbolizer>(&(*it))) {
raster_colorizer_ptr old_colorizer = sym->get_colorizer(),
new_colorizer = raster_colorizer_ptr();
new_colorizer->set_stops( old_colorizer->get_stops());
new_colorizer->set_default_mode( old_colorizer->get_default_mode() );
new_colorizer->set_default_color( old_colorizer->get_default_color() );
new_colorizer->set_epsilon( old_colorizer->get_epsilon() );
sym->set_colorizer(new_colorizer);
} else if (shield_symbolizer *sym = boost::get<shield_symbolizer>(&(*it))) {
copy_path_ptr(sym);
copy_text_ptr(sym);
} else if (text_symbolizer *sym = boost::get<text_symbolizer>(&(*it))) {
copy_text_ptr(sym);
}
}
}
}
开发者ID:madunic,项目名称:mapnik,代码行数:57,代码来源:rule.hpp
示例2: rule
rule(const rule& rhs, bool deep_copy = false)
: name_(rhs.name_),
min_scale_(rhs.min_scale_),
max_scale_(rhs.max_scale_),
syms_(rhs.syms_),
filter_(rhs.filter_),
else_filter_(rhs.else_filter_),
also_filter_(rhs.also_filter_)
{
if (deep_copy) {
std::string expr = to_expression_string(*filter_);
filter_ = parse_expression(expr,"utf8");
symbolizers::const_iterator it = syms_.begin();
symbolizers::const_iterator end = syms_.end();
// FIXME - metawriter_ptr?
for(; it != end; ++it)
{
boost::apply_visitor(deepcopy_symbolizer(),*it);
}
}
}
开发者ID:chriskoli,项目名称:mapnik,代码行数:24,代码来源:rule.hpp
示例3: end
symbolizers::iterator end()
{
return syms_.end();
}
开发者ID:madunic,项目名称:mapnik,代码行数:4,代码来源:rule.hpp
示例4: begin
symbolizers::iterator begin()
{
return syms_.begin();
}
开发者ID:madunic,项目名称:mapnik,代码行数:4,代码来源:rule.hpp
示例5: remove_at
void remove_at(size_t index)
{
if (index < syms_.size())
{
syms_.erase(syms_.begin()+index);
}
}
开发者ID:madunic,项目名称:mapnik,代码行数:7,代码来源:rule.hpp
示例6: append
void append(const symbolizer& sym)
{
syms_.push_back(sym);
}
开发者ID:madunic,项目名称:mapnik,代码行数:4,代码来源:rule.hpp
示例7: append
void append(const symbolizer_ptr& symbol)
{
syms_.push_back(symbol);
}
开发者ID:BackupTheBerlios,项目名称:mapnik-svn,代码行数:4,代码来源:rule.hpp
注:本文中的symbolizers类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论