Kaydet (Commit) 4520973c authored tarafından Armin Le Grand's avatar Armin Le Grand Kaydeden (comit) Caolán McNamara

Resolves: #i124580# corrected some conversions of scale values...

to integer positions

(cherry picked from commit d3c4a0c2)

Change-Id: Iae4c16250e95938999d60d1c60e1163dfba243cf
üst 0635918c
...@@ -786,8 +786,11 @@ void OutputDevice::DrawTransformedBitmapEx( ...@@ -786,8 +786,11 @@ void OutputDevice::DrawTransformedBitmapEx(
{ {
// with no rotation, shear or mirroring it can be mapped to DrawBitmapEx // with no rotation, shear or mirroring it can be mapped to DrawBitmapEx
// do *not* execute the mirroring here, it's done in the fallback // do *not* execute the mirroring here, it's done in the fallback
// #i124580# the correct DestSize needs to be calculated based on MaxXY values
const Point aDestPt(basegfx::fround(aTranslate.getX()), basegfx::fround(aTranslate.getY())); const Point aDestPt(basegfx::fround(aTranslate.getX()), basegfx::fround(aTranslate.getY()));
const Size aDestSize(basegfx::fround(aScale.getX()), basegfx::fround(aScale.getY())); const Size aDestSize(
basegfx::fround(aScale.getX() + aTranslate.getX()) - aDestPt.X(),
basegfx::fround(aScale.getY() + aTranslate.getY()) - aDestPt.Y());
DrawBitmapEx(aDestPt, aDestSize, rBitmapEx); DrawBitmapEx(aDestPt, aDestSize, rBitmapEx);
return; return;
...@@ -814,8 +817,11 @@ void OutputDevice::DrawTransformedBitmapEx( ...@@ -814,8 +817,11 @@ void OutputDevice::DrawTransformedBitmapEx(
{ {
// with no rotation or shear it can be mapped to DrawBitmapEx // with no rotation or shear it can be mapped to DrawBitmapEx
// do *not* execute the mirroring here, it's done in the fallback // do *not* execute the mirroring here, it's done in the fallback
// #i124580# the correct DestSize needs to be calculated based on MaxXY values
const Point aDestPt(basegfx::fround(aTranslate.getX()), basegfx::fround(aTranslate.getY())); const Point aDestPt(basegfx::fround(aTranslate.getX()), basegfx::fround(aTranslate.getY()));
const Size aDestSize(basegfx::fround(aScale.getX()), basegfx::fround(aScale.getY())); const Size aDestSize(
basegfx::fround(aScale.getX() + aTranslate.getX()) - aDestPt.X(),
basegfx::fround(aScale.getY() + aTranslate.getY()) - aDestPt.Y());
DrawBitmapEx(aDestPt, aDestSize, rBitmapEx); DrawBitmapEx(aDestPt, aDestSize, rBitmapEx);
return; return;
...@@ -879,8 +885,11 @@ void OutputDevice::DrawTransformedBitmapEx( ...@@ -879,8 +885,11 @@ void OutputDevice::DrawTransformedBitmapEx(
aTargetRange.getMinimum())); aTargetRange.getMinimum()));
// extract point and size; do not remove size, the bitmap may have been prepared reduced by purpose // extract point and size; do not remove size, the bitmap may have been prepared reduced by purpose
// #i124580# the correct DestSize needs to be calculated based on MaxXY values
const Point aDestPt(basegfx::fround(aVisibleRange.getMinX()), basegfx::fround(aVisibleRange.getMinY())); const Point aDestPt(basegfx::fround(aVisibleRange.getMinX()), basegfx::fround(aVisibleRange.getMinY()));
const Size aDestSize(basegfx::fround(aVisibleRange.getWidth()), basegfx::fround(aVisibleRange.getHeight())); const Size aDestSize(
basegfx::fround(aVisibleRange.getMaxX()) - aDestPt.X(),
basegfx::fround(aVisibleRange.getMaxY()) - aDestPt.Y());
DrawBitmapEx(aDestPt, aDestSize, aTransformed); DrawBitmapEx(aDestPt, aDestSize, aTransformed);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment