* Transform a template map to match the given map's georeferencing, using * an already determined transformation. */
| 62 | * an already determined transformation. |
| 63 | */ |
| 64 | void transformMap(Map& template_map, Map const& map, TemplateTransform const& transform) |
| 65 | { |
| 66 | template_map.applyOnAllObjects(transform.makeObjectTransform()); |
| 67 | template_map.setGeoreferencing(map.getGeoreferencing()); |
| 68 | |
| 69 | auto template_scale = (transform.template_scale_x + transform.template_scale_y) / 2; |
| 70 | template_scale *= double(template_map.getScaleDenominator()) / map.getScaleDenominator(); |
| 71 | if (!qFuzzyCompare(template_scale, 1)) |
| 72 | template_map.scaleAllSymbols(template_scale); |
| 73 | } |
| 74 | |
| 75 | } |
| 76 |
no test coverage detected