summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorCarsten Driesner <cd@openoffice.org>2011-01-21 17:18:37 +0100
committerCarsten Driesner <cd@openoffice.org>2011-01-21 17:18:37 +0100
commit605209eda74b0b31a8da020a2dfd2bbadbb1c7d4 (patch)
treedf8a931de7a4c4b1ee5ab1f7ed5506388943ecbc /drawinglayer
parentc931cca51fec6a327e94b22e93f0e2fb3fa1e43f (diff)
parentd646413d464dc5d6518f87daa8538cd0c600797f (diff)
removetooltypes01: Rebase to DEV300m98
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/processor2d/vclhelperbitmaprender.cxx39
1 files changed, 18 insertions, 21 deletions
diff --git a/drawinglayer/source/processor2d/vclhelperbitmaprender.cxx b/drawinglayer/source/processor2d/vclhelperbitmaprender.cxx
index 80e34ba27701..752bf6d13849 100644
--- a/drawinglayer/source/processor2d/vclhelperbitmaprender.cxx
+++ b/drawinglayer/source/processor2d/vclhelperbitmaprender.cxx
@@ -84,19 +84,18 @@ namespace drawinglayer
aOutlineRange.transform(aSimpleObjectMatrix);
}
- // prepare dest coor
- const sal_uInt32 nDiscreteWidth(basegfx::fround(aOutlineRange.getMaxX()));
- const sal_uInt32 nDiscreteHeight(basegfx::fround(aOutlineRange.getMaxY()));
- const Rectangle aDestRectPixel(
- basegfx::fround(aOutlineRange.getMinX()),
- basegfx::fround(aOutlineRange.getMinY()),
- nDiscreteWidth > 0 ? nDiscreteWidth - 1 : 0,
- nDiscreteHeight > 0 ? nDiscreteHeight - 1 : 0);
+ // prepare dest coordinates
+ const Point aPoint(
+ basegfx::fround(aOutlineRange.getMinX()),
+ basegfx::fround(aOutlineRange.getMinY()));
+ const Size aSize(
+ basegfx::fround(aOutlineRange.getWidth()),
+ basegfx::fround(aOutlineRange.getHeight()));
// paint it using GraphicManager
Graphic aGraphic(rBitmapEx);
GraphicObject aGraphicObject(aGraphic);
- aGraphicObject.Draw(&rOutDev, aDestRectPixel.TopLeft(), aDestRectPixel.GetSize(), &aAttributes);
+ aGraphicObject.Draw(&rOutDev, aPoint, aSize, &aAttributes);
}
void RenderBitmapPrimitive2D_BitmapEx(
@@ -110,13 +109,13 @@ namespace drawinglayer
// prepare dest coor. Necessary to expand since vcl's DrawBitmapEx draws one pix less
basegfx::B2DRange aOutlineRange(0.0, 0.0, 1.0, 1.0);
aOutlineRange.transform(rTransform);
- const sal_uInt32 nDiscreteWidth(basegfx::fround(aOutlineRange.getMaxX()));
- const sal_uInt32 nDiscreteHeight(basegfx::fround(aOutlineRange.getMaxY()));
- const Rectangle aDestRectPixel(
- basegfx::fround(aOutlineRange.getMinX()),
- basegfx::fround(aOutlineRange.getMinY()),
- nDiscreteWidth > 0 ? nDiscreteWidth - 1 : 0,
- nDiscreteHeight > 0 ? nDiscreteHeight - 1 : 0);
+ // prepare dest coordinates
+ const Point aPoint(
+ basegfx::fround(aOutlineRange.getMinX()),
+ basegfx::fround(aOutlineRange.getMinY()));
+ const Size aSize(
+ basegfx::fround(aOutlineRange.getWidth()),
+ basegfx::fround(aOutlineRange.getHeight()));
// decompose matrix to check for shear, rotate and mirroring
basegfx::B2DVector aScale, aTranslate;
@@ -142,7 +141,7 @@ namespace drawinglayer
}
// draw bitmap
- rOutDev.DrawBitmapEx(aDestRectPixel.TopLeft(), aDestRectPixel.GetSize(), aContent);
+ rOutDev.DrawBitmapEx(aPoint, aSize, aContent);
}
void RenderBitmapPrimitive2D_self(
@@ -153,13 +152,11 @@ namespace drawinglayer
// process self with free transformation (containing shear and rotate). Get dest rect in pixels.
basegfx::B2DRange aOutlineRange(0.0, 0.0, 1.0, 1.0);
aOutlineRange.transform(rTransform);
- const sal_uInt32 nDiscreteWidth(basegfx::fround(aOutlineRange.getMaxX()));
- const sal_uInt32 nDiscreteHeight(basegfx::fround(aOutlineRange.getMaxY()));
const Rectangle aDestRectLogic(
basegfx::fround(aOutlineRange.getMinX()),
basegfx::fround(aOutlineRange.getMinY()),
- nDiscreteWidth > 0 ? nDiscreteWidth - 1 : 0,
- nDiscreteHeight > 0 ? nDiscreteHeight - 1 : 0);
+ basegfx::fround(aOutlineRange.getMaxX()),
+ basegfx::fround(aOutlineRange.getMaxY()));
const Rectangle aDestRectPixel(rOutDev.LogicToPixel(aDestRectLogic));
// #i96708# check if Metafile is recorded