fix gamma for symbolizers that do not (yet) support user driven gamma - closes #2912
This commit is contained in:
parent
0d86afff36
commit
8172eda3d1
3 changed files with 21 additions and 0 deletions
|
@ -214,6 +214,14 @@ void agg_renderer<T0,T1>::process(debug_symbolizer const& sym,
|
|||
|
||||
debug_symbolizer_mode_enum mode = get<debug_symbolizer_mode_enum>(sym, keys::mode, feature, common_.vars_, DEBUG_SYM_MODE_COLLISION);
|
||||
|
||||
ras_ptr->reset();
|
||||
if (gamma_method_ != GAMMA_POWER || gamma_ != 1.0)
|
||||
{
|
||||
ras_ptr->gamma(agg::gamma_power());
|
||||
gamma_method_ = GAMMA_POWER;
|
||||
gamma_ = 1.0;
|
||||
}
|
||||
|
||||
if (mode == DEBUG_SYM_MODE_RINGS)
|
||||
{
|
||||
RingRenderer<buffer_type> renderer(*ras_ptr,*current_buffer_,common_.t_,prj_trans);
|
||||
|
|
|
@ -111,6 +111,12 @@ void agg_renderer<T0,T1>::process(dot_symbolizer const& sym,
|
|||
double opacity = get<double>(sym, keys::opacity, feature, common_.vars_, 1.0);
|
||||
color const& fill = get<mapnik::color>(sym, keys::fill, feature, common_.vars_, mapnik::color(128,128,128));
|
||||
ras_ptr->reset();
|
||||
if (gamma_method_ != GAMMA_POWER || gamma_ != 1.0)
|
||||
{
|
||||
ras_ptr->gamma(agg::gamma_power());
|
||||
gamma_method_ = GAMMA_POWER;
|
||||
gamma_ = 1.0;
|
||||
}
|
||||
agg::rendering_buffer buf(current_buffer_->bytes(),current_buffer_->width(),current_buffer_->height(),current_buffer_->row_size());
|
||||
using blender_type = agg::comp_op_adaptor_rgba_pre<agg::rgba8, agg::order_rgba>;
|
||||
using pixfmt_comp_type = agg::pixfmt_custom_blend_rgba<blender_type, agg::rendering_buffer>;
|
||||
|
|
|
@ -237,6 +237,13 @@ void agg_renderer<T0,T1>::process(line_pattern_symbolizer const& sym,
|
|||
|
||||
std::string filename = get<std::string, keys::file>(sym, feature, common_.vars_);
|
||||
if (filename.empty()) return;
|
||||
ras_ptr->reset();
|
||||
if (gamma_method_ != GAMMA_POWER || gamma_ != 1.0)
|
||||
{
|
||||
ras_ptr->gamma(agg::gamma_power());
|
||||
gamma_method_ = GAMMA_POWER;
|
||||
gamma_ = 1.0;
|
||||
}
|
||||
std::shared_ptr<mapnik::marker const> marker = marker_cache::instance().find(filename, true);
|
||||
agg_renderer_process_visitor_l<buffer_type> visitor(common_,
|
||||
pixmap_,
|
||||
|
|
Loading…
Reference in a new issue