summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorAntje Kazimiers <ntj@allesjetzt.net>2021-01-30 19:23:52 +0100
committerMichael Stahl <michael.stahl@allotropia.de>2021-02-01 15:59:28 +0100
commitfda6ca70c253ede3bf758f90ae7aacd49bcf6dd9 (patch)
treeba73b17bf659b137eefea775113786996c0b5cc1 /drawinglayer
parentc7b1da037e7d739c5be8d0d7982725c31c105e19 (diff)
tdf#39674 Replace Quadrat
Change-Id: Icdc27fa9ab33a6c5a442760a9491e82000883ef1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110177 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/inc/converters.hxx2
-rw-r--r--drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx12
-rw-r--r--drawinglayer/source/tools/converters.cxx6
3 files changed, 10 insertions, 10 deletions
diff --git a/drawinglayer/inc/converters.hxx b/drawinglayer/inc/converters.hxx
index cd1fdba37bbc..5e4e8a49bdb5 100644
--- a/drawinglayer/inc/converters.hxx
+++ b/drawinglayer/inc/converters.hxx
@@ -29,7 +29,7 @@ namespace drawinglayer
const geometry::ViewInformation2D& rViewInformation2D,
sal_uInt32 nDiscreteWidth,
sal_uInt32 nDiscreteHeight,
- sal_uInt32 nMaxQuadratPixels);
+ sal_uInt32 nMaxSquarePixels);
} // end of namespace drawinglayer
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index dba886f1cc32..7cf4fc4b2cd2 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -2203,14 +2203,14 @@ void VclMetafileProcessor2D::processTransparencePrimitive2D(
const tools::Rectangle aRectPixel(mpOutputDevice->LogicToPixel(aRectLogic));
Size aSizePixel(aRectPixel.GetSize());
ScopedVclPtrInstance<VirtualDevice> aBufferDevice;
- const sal_uInt32 nMaxQuadratPixels(500000);
+ const sal_uInt32 nMaxSquarePixels(500000);
const sal_uInt32 nViewVisibleArea(aSizePixel.getWidth() * aSizePixel.getHeight());
double fReduceFactor(1.0);
- if (nViewVisibleArea > nMaxQuadratPixels)
+ if (nViewVisibleArea > nMaxSquarePixels)
{
// reduce render size
- fReduceFactor = sqrt(double(nMaxQuadratPixels) / static_cast<double>(nViewVisibleArea));
+ fReduceFactor = sqrt(double(nMaxSquarePixels) / static_cast<double>(nViewVisibleArea));
aSizePixel = Size(
basegfx::fround(static_cast<double>(aSizePixel.getWidth()) * fReduceFactor),
basegfx::fround(static_cast<double>(aSizePixel.getHeight()) * fReduceFactor));
@@ -2314,7 +2314,7 @@ VclMetafileProcessor2D::CreateBufferDevice(const basegfx::B2DRange& rCandidateRa
geometry::ViewInformation2D& rViewInfo,
tools::Rectangle& rRectLogic, Size& rSizePixel)
{
- constexpr double fMaxQuadratPixels = 500000;
+ constexpr double fMaxSquarePixels = 500000;
basegfx::B2DRange aViewRange(rCandidateRange);
aViewRange.transform(maCurrentTransformation);
rRectLogic = tools::Rectangle(static_cast<tools::Long>(std::floor(aViewRange.getMinX())),
@@ -2326,10 +2326,10 @@ VclMetafileProcessor2D::CreateBufferDevice(const basegfx::B2DRange& rCandidateRa
const double fViewVisibleArea(rSizePixel.getWidth() * rSizePixel.getHeight());
double fReduceFactor(1.0);
- if (fViewVisibleArea > fMaxQuadratPixels)
+ if (fViewVisibleArea > fMaxSquarePixels)
{
// reduce render size
- fReduceFactor = sqrt(fMaxQuadratPixels / fViewVisibleArea);
+ fReduceFactor = sqrt(fMaxSquarePixels / fViewVisibleArea);
rSizePixel = Size(basegfx::fround(rSizePixel.getWidth() * fReduceFactor),
basegfx::fround(rSizePixel.getHeight() * fReduceFactor));
}
diff --git a/drawinglayer/source/tools/converters.cxx b/drawinglayer/source/tools/converters.cxx
index ff9b79a688fa..e1a59d0175df 100644
--- a/drawinglayer/source/tools/converters.cxx
+++ b/drawinglayer/source/tools/converters.cxx
@@ -40,7 +40,7 @@ namespace drawinglayer
const geometry::ViewInformation2D& rViewInformation2D,
sal_uInt32 nDiscreteWidth,
sal_uInt32 nDiscreteHeight,
- sal_uInt32 nMaxQuadratPixels)
+ sal_uInt32 nMaxSquarePixels)
{
BitmapEx aRetval;
@@ -51,10 +51,10 @@ namespace drawinglayer
const sal_uInt32 nViewVisibleArea(nDiscreteWidth * nDiscreteHeight);
drawinglayer::primitive2d::Primitive2DContainer aSequence(rSeq);
- if(nViewVisibleArea > nMaxQuadratPixels)
+ if(nViewVisibleArea > nMaxSquarePixels)
{
// reduce render size
- double fReduceFactor = sqrt(static_cast<double>(nMaxQuadratPixels) / static_cast<double>(nViewVisibleArea));
+ double fReduceFactor = sqrt(static_cast<double>(nMaxSquarePixels) / static_cast<double>(nViewVisibleArea));
nDiscreteWidth = basegfx::fround(static_cast<double>(nDiscreteWidth) * fReduceFactor);
nDiscreteHeight = basegfx::fround(static_cast<double>(nDiscreteHeight) * fReduceFactor);