summaryrefslogtreecommitdiff
path: root/drawinglayer/source/processor3d/zbufferprocessor3d.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'drawinglayer/source/processor3d/zbufferprocessor3d.cxx')
-rw-r--r--drawinglayer/source/processor3d/zbufferprocessor3d.cxx24
1 files changed, 10 insertions, 14 deletions
diff --git a/drawinglayer/source/processor3d/zbufferprocessor3d.cxx b/drawinglayer/source/processor3d/zbufferprocessor3d.cxx
index 56cfc3c45c18..b9cb8ffb7a1d 100644
--- a/drawinglayer/source/processor3d/zbufferprocessor3d.cxx
+++ b/drawinglayer/source/processor3d/zbufferprocessor3d.cxx
@@ -27,6 +27,9 @@
#include <basegfx/polygon/b3dpolygontools.hxx>
#include <basegfx/polygon/b3dpolypolygontools.hxx>
#include <drawinglayer/attribute/sdrlightingattribute3d.hxx>
+#include <o3tl/safeint.hxx>
+#include <svtools/optionsdrawinglayer.hxx>
+#include <utility>
using namespace com::sun::star;
@@ -246,14 +249,8 @@ private:
public:
ZBufferRasterConverter3D(basegfx::BZPixelRaster& rBuffer, const drawinglayer::processor3d::ZBufferProcessor3D& rProcessor)
- : basegfx::RasterConverter3D(),
- mrProcessor(rProcessor),
+ : mrProcessor(rProcessor),
mrBuffer(rBuffer),
- maIntZ(),
- maIntColor(),
- maIntNormal(),
- maIntTexture(),
- maIntInvTexture(),
mpCurrentMaterial(nullptr),
mbModifyColor(false),
mbUseTex(false),
@@ -274,7 +271,7 @@ void ZBufferRasterConverter3D::processLineSpan(const basegfx::RasterConversionLi
if(nSpanCount & 0x0001)
return;
- if(nLine < 0 || nLine >= static_cast<sal_Int32>(mrBuffer.getHeight()))
+ if(nLine < 0 || o3tl::make_unsigned(nLine) >= mrBuffer.getHeight())
return;
sal_uInt32 nXA(std::min(mrBuffer.getWidth(), static_cast<sal_uInt32>(std::max(sal_Int32(0), basegfx::fround(rA.getX().getVal())))));
@@ -379,16 +376,16 @@ private:
public:
RasterPrimitive3D(
- const std::shared_ptr< drawinglayer::texture::GeoTexSvx >& pGeoTexSvx,
- const std::shared_ptr< drawinglayer::texture::GeoTexSvx >& pTransparenceGeoTexSvx,
+ std::shared_ptr< drawinglayer::texture::GeoTexSvx > pGeoTexSvx,
+ std::shared_ptr< drawinglayer::texture::GeoTexSvx > pTransparenceGeoTexSvx,
const drawinglayer::attribute::MaterialAttribute3D& rMaterial,
const basegfx::B3DPolyPolygon& rPolyPolygon,
bool bModulate,
bool bFilter,
bool bSimpleTextureActive,
bool bIsLine)
- : mpGeoTexSvx(pGeoTexSvx),
- mpTransparenceGeoTexSvx(pTransparenceGeoTexSvx),
+ : mpGeoTexSvx(std::move(pGeoTexSvx)),
+ mpTransparenceGeoTexSvx(std::move(pTransparenceGeoTexSvx)),
maMaterial(rMaterial),
maPolyPolygon(rPolyPolygon),
mfCenterZ(basegfx::utils::getRange(rPolyPolygon).getCenter().getZ()),
@@ -440,7 +437,7 @@ namespace drawinglayer::processor3d
if(mnAntiAlialize > 1)
{
- const bool bForceLineSnap(getOptionsDrawinglayer().IsAntiAliasing() && getOptionsDrawinglayer().IsSnapHorVerLinesToDiscrete());
+ const bool bForceLineSnap(SvtOptionsDrawinglayer::IsAntiAliasing() && SvtOptionsDrawinglayer::IsSnapHorVerLinesToDiscrete());
if(bForceLineSnap)
{
@@ -511,7 +508,6 @@ namespace drawinglayer::processor3d
sal_uInt32 nStartLine,
sal_uInt32 nStopLine)
: DefaultProcessor3D(rViewInformation3D, rSdrSceneAttribute, rSdrLightingAttribute),
- maInvEyeToView(),
mnAntiAlialize(nAntiAlialize),
mnStartLine(nStartLine),
mnStopLine(nStopLine)