tdf#160084 Simplify comparison for basegfx::fTools

Change-Id: I8ef1df248d3ed9fbc804e53897ca934cce9683e3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176779
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
This commit is contained in:
Bogdan Buzea 2024-11-19 16:55:33 +01:00 committed by Xisco Fauli
parent b537e5b6d5
commit d8e7a3b245
2 changed files with 4 additions and 4 deletions

View file

@ -320,7 +320,7 @@ namespace drawinglayer::processor2d
const primitive2d::PolygonStrokePrimitive2D& rPolygonCandidate(static_cast< const primitive2d::PolygonStrokePrimitive2D& >(rCandidate)); const primitive2d::PolygonStrokePrimitive2D& rPolygonCandidate(static_cast< const primitive2d::PolygonStrokePrimitive2D& >(rCandidate));
const attribute::LineAttribute& rLineAttribute = rPolygonCandidate.getLineAttribute(); const attribute::LineAttribute& rLineAttribute = rPolygonCandidate.getLineAttribute();
if(basegfx::fTools::more(rLineAttribute.getWidth(), 0.0)) if(rLineAttribute.getWidth() > 0.0)
{ {
if(basegfx::B2DLineJoin::Miter == rLineAttribute.getLineJoin()) if(basegfx::B2DLineJoin::Miter == rLineAttribute.getLineJoin())
{ {
@ -357,13 +357,13 @@ namespace drawinglayer::processor2d
double fLogicHitTolerance(0.0); double fLogicHitTolerance(0.0);
// if WaveHeight, grow by it // if WaveHeight, grow by it
if(basegfx::fTools::more(rPolygonCandidate.getWaveHeight(), 0.0)) if(rPolygonCandidate.getWaveHeight() > 0.0)
{ {
fLogicHitTolerance += rPolygonCandidate.getWaveHeight(); fLogicHitTolerance += rPolygonCandidate.getWaveHeight();
} }
// if line width, grow by it // if line width, grow by it
if(basegfx::fTools::more(rPolygonCandidate.getLineAttribute().getWidth(), 0.0)) if(rPolygonCandidate.getLineAttribute().getWidth() > 0.0)
{ {
fLogicHitTolerance += rPolygonCandidate.getLineAttribute().getWidth() * 0.5; fLogicHitTolerance += rPolygonCandidate.getLineAttribute().getWidth() * 0.5;
} }

View file

@ -80,7 +80,7 @@ namespace drawinglayer::processor3d
0, // shadow3d doesn't have rPrimitive.getShadowBlur() yet. 0, // shadow3d doesn't have rPrimitive.getShadowBlur() yet.
std::move(aNewSubList)); std::move(aNewSubList));
if(basegfx::fTools::more(rPrimitive.getShadowTransparence(), 0.0)) if(rPrimitive.getShadowTransparence() > 0.0)
{ {
// create simpleTransparencePrimitive, add created primitives // create simpleTransparencePrimitive, add created primitives
primitive2d::Primitive2DContainer aNewTransPrimitiveVector { pNew }; primitive2d::Primitive2DContainer aNewTransPrimitiveVector { pNew };