is_switchable to control switchabilty of vertex_converters -- revive stroke_tag
fix vertex_converter in cairo/agg
This commit is contained in:
parent
470da20d53
commit
6d4a4139b3
6 changed files with 7 additions and 22 deletions
|
@ -28,7 +28,7 @@ info_dialog::info_dialog(QVector<QPair<QString,QString> > const& info, QWidget *
|
||||||
ui.tableWidget->setHorizontalHeaderItem(0,new QTableWidgetItem("Name"));
|
ui.tableWidget->setHorizontalHeaderItem(0,new QTableWidgetItem("Name"));
|
||||||
ui.tableWidget->setHorizontalHeaderItem(1,new QTableWidgetItem("Value"));
|
ui.tableWidget->setHorizontalHeaderItem(1,new QTableWidgetItem("Value"));
|
||||||
|
|
||||||
ui.tableWidget->set_rowCount(info.size());
|
ui.tableWidget->setRowCount(info.size());
|
||||||
ui.tableWidget->setColumnCount(2);
|
ui.tableWidget->setColumnCount(2);
|
||||||
for (int i=0;i<info.size();++i)
|
for (int i=0;i<info.size();++i)
|
||||||
{
|
{
|
||||||
|
|
|
@ -46,7 +46,7 @@ layer_info_dialog::layer_info_dialog(mapnik::layer& lay, QWidget *parent)
|
||||||
{
|
{
|
||||||
mapnik::parameters ps = ds->params();
|
mapnik::parameters ps = ds->params();
|
||||||
|
|
||||||
ui.tableWidget->set_rowCount(ps.size());
|
ui.tableWidget->setRowCount(ps.size());
|
||||||
ui.tableWidget->setColumnCount(2);
|
ui.tableWidget->setColumnCount(2);
|
||||||
|
|
||||||
mapnik::parameters::const_iterator pos;
|
mapnik::parameters::const_iterator pos;
|
||||||
|
|
|
@ -260,26 +260,16 @@ struct is_switchable
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct is_switchable<T,transform_tag>
|
struct is_switchable<T, transform_tag>
|
||||||
{
|
|
||||||
static constexpr bool value = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
// https://github.com/mapnik/mapnik/issues/2791
|
|
||||||
/*
|
|
||||||
template <typename T>
|
|
||||||
struct is_switchable<T,stroke_tag>
|
|
||||||
{
|
{
|
||||||
static constexpr bool value = false;
|
static constexpr bool value = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct is_switchable<T,offset_transform_tag>
|
struct is_switchable<T, stroke_tag>
|
||||||
{
|
{
|
||||||
static constexpr bool value = false;
|
static constexpr bool value = false;
|
||||||
};
|
};
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
template <typename Dispatcher, typename... ConverterTypes>
|
template <typename Dispatcher, typename... ConverterTypes>
|
||||||
struct converters_helper;
|
struct converters_helper;
|
||||||
|
|
|
@ -167,9 +167,7 @@ void agg_renderer<T0,T1>::process(line_symbolizer const& sym,
|
||||||
using vertex_converter_type = vertex_converter<clip_line_tag, transform_tag,
|
using vertex_converter_type = vertex_converter<clip_line_tag, transform_tag,
|
||||||
affine_transform_tag,
|
affine_transform_tag,
|
||||||
simplify_tag, smooth_tag,
|
simplify_tag, smooth_tag,
|
||||||
offset_transform_tag,
|
offset_transform_tag>;
|
||||||
dash_tag, stroke_tag>;
|
|
||||||
|
|
||||||
vertex_converter_type converter(clip_box,sym,common_.t_,prj_trans,tr,feature,common_.vars_,common_.scale_factor_);
|
vertex_converter_type converter(clip_box,sym,common_.t_,prj_trans,tr,feature,common_.vars_,common_.scale_factor_);
|
||||||
if (clip) converter.set<clip_line_tag>(); // optional clip (default: true)
|
if (clip) converter.set<clip_line_tag>(); // optional clip (default: true)
|
||||||
converter.set<transform_tag>(); // always transform
|
converter.set<transform_tag>(); // always transform
|
||||||
|
|
|
@ -146,8 +146,7 @@ void cairo_renderer<T>::process(line_pattern_symbolizer const& sym,
|
||||||
using vertex_converter_type = vertex_converter<clip_line_tag, transform_tag,
|
using vertex_converter_type = vertex_converter<clip_line_tag, transform_tag,
|
||||||
affine_transform_tag,
|
affine_transform_tag,
|
||||||
simplify_tag, smooth_tag,
|
simplify_tag, smooth_tag,
|
||||||
offset_transform_tag,
|
offset_transform_tag>;
|
||||||
dash_tag, stroke_tag>;
|
|
||||||
|
|
||||||
vertex_converter_type converter(clipping_extent,sym, common_.t_, prj_trans, tr, feature, common_.vars_, common_.scale_factor_);
|
vertex_converter_type converter(clipping_extent,sym, common_.t_, prj_trans, tr, feature, common_.vars_, common_.scale_factor_);
|
||||||
|
|
||||||
|
|
|
@ -85,8 +85,7 @@ void cairo_renderer<T>::process(line_symbolizer const& sym,
|
||||||
transform_tag,
|
transform_tag,
|
||||||
affine_transform_tag,
|
affine_transform_tag,
|
||||||
simplify_tag, smooth_tag,
|
simplify_tag, smooth_tag,
|
||||||
offset_transform_tag,
|
offset_transform_tag>;
|
||||||
dash_tag, stroke_tag>;
|
|
||||||
|
|
||||||
vertex_converter_type converter(clipping_extent,sym,common_.t_,prj_trans,tr,feature,common_.vars_,common_.scale_factor_);
|
vertex_converter_type converter(clipping_extent,sym,common_.t_,prj_trans,tr,feature,common_.vars_,common_.scale_factor_);
|
||||||
|
|
||||||
|
@ -96,7 +95,6 @@ void cairo_renderer<T>::process(line_symbolizer const& sym,
|
||||||
converter.set<affine_transform_tag>(); // optional affine transform
|
converter.set<affine_transform_tag>(); // optional affine transform
|
||||||
if (simplify_tolerance > 0.0) converter.set<simplify_tag>(); // optional simplify converter
|
if (simplify_tolerance > 0.0) converter.set<simplify_tag>(); // optional simplify converter
|
||||||
if (smooth > 0.0) converter.set<smooth_tag>(); // optional smooth converter
|
if (smooth > 0.0) converter.set<smooth_tag>(); // optional smooth converter
|
||||||
|
|
||||||
using apply_vertex_converter_type = detail::apply_vertex_converter<vertex_converter_type, cairo_context>;
|
using apply_vertex_converter_type = detail::apply_vertex_converter<vertex_converter_type, cairo_context>;
|
||||||
using vertex_processor_type = geometry::vertex_processor<apply_vertex_converter_type>;
|
using vertex_processor_type = geometry::vertex_processor<apply_vertex_converter_type>;
|
||||||
apply_vertex_converter_type apply(converter, context_);
|
apply_vertex_converter_type apply(converter, context_);
|
||||||
|
|
Loading…
Reference in a new issue