diff --git a/src/agg/process_polygon_pattern_symbolizer.cpp b/src/agg/process_polygon_pattern_symbolizer.cpp index 7e322225c..f32b7c60c 100644 --- a/src/agg/process_polygon_pattern_symbolizer.cpp +++ b/src/agg/process_polygon_pattern_symbolizer.cpp @@ -28,7 +28,7 @@ #include #include #include - +#include // agg #include "agg_basics.h" #include "agg_rendering_buffer.h" @@ -129,19 +129,28 @@ void agg_renderer::process(polygon_pattern_symbolizer const& sym, span_gen_type sg(img_src, offset_x, offset_y); renderer_type rp(renb,sa, sg); + //metawriter_with_properties writer = sym.get_metawriter(); + + box2d inflated_extent = query_extent_ * 1.1; + typedef boost::mpl::vector conv_types; + vertex_converter,rasterizer,polygon_pattern_symbolizer, proj_transform, CoordTransform,conv_types> + converter(inflated_extent,*ras_ptr,sym,t_,prj_trans); + + //if (sym.clip()) + converter.set(); //optional clip (default: true) + converter.set(); //always transform + //if (sym.smooth() > 0.0) converter.set(); // optional smooth converter + for (unsigned i=0;iget_geometry(i); if (geom.num_points() > 2) { - clipped_geometry_type clipped(geom); - clipped.clip_box(query_extent_.minx(),query_extent_.miny(),query_extent_.maxx(),query_extent_.maxy()); - path_type path(t_,clipped,prj_trans); - ras_ptr->add_path(path); - //if (writer.first) writer.first->add_polygon(path, *feature, t_, writer.second); + converter.apply(geom); } } + agg::render_scanlines(*ras_ptr, sl, rp); }