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.
This commit is contained in:
Thomas Goyne 2014-05-16 10:54:00 -07:00
parent 0f030c45f3
commit 229b6cf63d
1 changed files with 1 additions and 1 deletions

View File

@ -133,7 +133,7 @@ namespace {
block->ProcessParameters(resample_tags, state);
for (auto drawing : blocks | agi::of_type<AssDialogueBlockDrawing>())
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);