From 229b6cf63d109718bd02d35aebc183235b72d8bf Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Fri, 16 May 2014 10:54:00 -0700 Subject: [PATCH] Fix resampling drawings with AR changes The shift from margins should be applied only to the line's position, not to each point in the drawing, and the scale needs to compensate for that the scale on the style is being changed as well. --- src/resolution_resampler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/resolution_resampler.cpp b/src/resolution_resampler.cpp index d1ddf8d8b..c2882ac4a 100644 --- a/src/resolution_resampler.cpp +++ b/src/resolution_resampler.cpp @@ -133,7 +133,7 @@ namespace { block->ProcessParameters(resample_tags, state); for (auto drawing : blocks | agi::of_type()) - drawing->text = transform_drawing(drawing->text, state->margin[LEFT], state->margin[TOP], state->rx, state->ry); + drawing->text = transform_drawing(drawing->text, 0, 0, state->rx / state->ar, state->ry); for (size_t i = 0; i < 3; ++i) diag.Margin[i] = int((diag.Margin[i] + state->margin[i]) * (i < 2 ? state->rx : state->ry) + 0.5);