MCPcopy Create free account
hub / github.com/MapServer/MapServer / render

Method render

renderers/agg/include/agg_svg_path_renderer.h:228–298  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

226 // image and/or to make it translucent.
227 template<class Rasterizer, class Scanline, class Renderer>
228 void render(Rasterizer& ras,
229 Scanline& sl,
230 Renderer& ren,
231 const trans_affine& mtx,
232 const rect_i& cb,
233 double opacity=1.0)
234 {
235 unsigned i;
236
237 ras.clip_box(cb.x1, cb.y1, cb.x2, cb.y2);
238 m_curved_count.count(0);
239
240 for(i = 0; i < m_attr_storage.size(); i++)
241 {
242 const path_attributes& attr = m_attr_storage[i];
243 m_transform = attr.transform;
244 m_transform *= mtx;
245 double scl = m_transform.scale();
246 //m_curved.approximation_method(curve_inc);
247 m_curved.approximation_scale(scl);
248 m_curved.angle_tolerance(0.0);
249
250 rgba8 color;
251
252 if(attr.fill_flag)
253 {
254 ras.reset();
255 ras.filling_rule(attr.even_odd_flag ? fill_even_odd : fill_non_zero);
256 if(fabs(m_curved_trans_contour.width()) < 0.0001)
257 {
258 ras.add_path(m_curved_trans, attr.index);
259 }
260 else
261 {
262 m_curved_trans_contour.miter_limit(attr.miter_limit);
263 ras.add_path(m_curved_trans_contour, attr.index);
264 }
265
266 color = attr.fill_color;
267 color.opacity(color.opacity() * opacity);
268 ren.color(color);
269 mapserver::render_scanlines(ras, sl, ren);
270 }
271
272 if(attr.stroke_flag)
273 {
274 m_curved_stroked.width(attr.stroke_width);
275 //m_curved_stroked.line_join((attr.line_join == miter_join) ? miter_join_round : attr.line_join);
276 m_curved_stroked.line_join(attr.line_join);
277 m_curved_stroked.line_cap(attr.line_cap);
278 m_curved_stroked.miter_limit(attr.miter_limit);
279 m_curved_stroked.inner_join(inner_round);
280 m_curved_stroked.approximation_scale(scl);
281
282 // If the *visual* line width is considerable we
283 // turn on processing of curve cusps.
284 //---------------------
285 if(attr.stroke_width * scl > 1.0)

Callers

nothing calls this directly

Calls 15

render_scanlinesFunction · 0.85
clip_boxMethod · 0.45
countMethod · 0.45
sizeMethod · 0.45
scaleMethod · 0.45
approximation_scaleMethod · 0.45
angle_toleranceMethod · 0.45
resetMethod · 0.45
filling_ruleMethod · 0.45
widthMethod · 0.45
add_pathMethod · 0.45
miter_limitMethod · 0.45

Tested by

no test coverage detected