grid_renderer: only clamp markers size if initial grid resolution is reduced
This commit is contained in:
parent
7da40e3700
commit
104dd25a94
1 changed files with 12 additions and 4 deletions
|
@ -132,10 +132,18 @@ void grid_renderer<T>::process(markers_symbolizer const& sym,
|
||||||
stroke const& stroke_ = sym.get_stroke();
|
stroke const& stroke_ = sym.get_stroke();
|
||||||
double strk_width = stroke_.get_width();
|
double strk_width = stroke_.get_width();
|
||||||
|
|
||||||
|
double w;
|
||||||
|
double h;
|
||||||
|
unsigned int res = pixmap_.get_resolution();
|
||||||
|
if (res != 1) {
|
||||||
// clamp to at least 4 px otherwise interactive pixels can be too small
|
// clamp to at least 4 px otherwise interactive pixels can be too small
|
||||||
double min = static_cast<double>(4/pixmap_.get_resolution());
|
double min = static_cast<double>(4/pixmap_.get_resolution());
|
||||||
double w = std::max(sym.get_width()/pixmap_.get_resolution(),min);
|
w = std::max(sym.get_width()/res,min);
|
||||||
double h = std::max(sym.get_height()/pixmap_.get_resolution(),min);
|
h = std::max(sym.get_height()/res,min);
|
||||||
|
} else {
|
||||||
|
w = sym.get_width()/res;
|
||||||
|
h = sym.get_height()/res;
|
||||||
|
}
|
||||||
|
|
||||||
arrow arrow_;
|
arrow arrow_;
|
||||||
box2d<double> extent;
|
box2d<double> extent;
|
||||||
|
|
Loading…
Reference in a new issue