summaryrefslogtreecommitdiff
path: root/drawinglayer/source/processor2d/hittestprocessor2d.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'drawinglayer/source/processor2d/hittestprocessor2d.cxx')
-rw-r--r--drawinglayer/source/processor2d/hittestprocessor2d.cxx72
1 files changed, 36 insertions, 36 deletions
diff --git a/drawinglayer/source/processor2d/hittestprocessor2d.cxx b/drawinglayer/source/processor2d/hittestprocessor2d.cxx
index 387bdfbf6814..8f3ad7acb179 100644
--- a/drawinglayer/source/processor2d/hittestprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/hittestprocessor2d.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -55,7 +55,7 @@ namespace drawinglayer
const basegfx::B2DPoint& rLogicHitPosition,
double fLogicHitTolerance,
bool bHitTextOnly)
- : BaseProcessor2D(rViewInformation),
+ : BaseProcessor2D(rViewInformation),
maDiscreteHitPosition(),
mfDiscreteHitTolerance(0.0),
mbHit(false),
@@ -74,7 +74,7 @@ namespace drawinglayer
else if(basegfx::fTools::more(mfDiscreteHitTolerance, 0.0))
{
// generate discrete hit tolerance
- mfDiscreteHitTolerance = (getViewInformation2D().getObjectToViewTransformation()
+ mfDiscreteHitTolerance = (getViewInformation2D().getObjectToViewTransformation()
* basegfx::B2DVector(mfDiscreteHitTolerance, 0.0)).getLength();
}
@@ -109,8 +109,8 @@ namespace drawinglayer
{
// check if a polygon edge is hit
return basegfx::tools::isInEpsilonRange(
- aLocalPolygon,
- getDiscreteHitPosition(),
+ aLocalPolygon,
+ getDiscreteHitPosition(),
fDiscreteHitTolerance);
}
@@ -138,10 +138,10 @@ namespace drawinglayer
if(aPolygonRange.isInside(getDiscreteHitPosition()))
{
// if a HitTolerance is given, check for polygon edge hit in epsilon first
- if(bDiscreteHitToleranceUsed &&
+ if(bDiscreteHitToleranceUsed &&
basegfx::tools::isInEpsilonRange(
- aLocalPolyPolygon,
- getDiscreteHitPosition(),
+ aLocalPolyPolygon,
+ getDiscreteHitPosition(),
fDiscreteHitTolerance))
{
bRetval = true;
@@ -179,7 +179,7 @@ namespace drawinglayer
const basegfx::B2DPoint aRelativePoint(aInverseSceneTransform * aLogicHitPosition);
// check if test point is inside scene's unified area at all
- if(aRelativePoint.getX() >= 0.0 && aRelativePoint.getX() <= 1.0
+ if(aRelativePoint.getX() >= 0.0 && aRelativePoint.getX() <= 1.0
&& aRelativePoint.getY() >= 0.0 && aRelativePoint.getY() <= 1.0)
{
// get 3D view information
@@ -210,9 +210,9 @@ namespace drawinglayer
{
// bound volumes hit, geometric cut tests needed
drawinglayer::processor3d::CutFindProcessor aCutFindProcessor(
- rObjectViewInformation3D,
- aFront,
- aBack,
+ rObjectViewInformation3D,
+ aFront,
+ aBack,
true);
aCutFindProcessor.process(rPrimitives);
@@ -237,7 +237,7 @@ namespace drawinglayer
// process(xExtracted2DSceneShadow);
// }
// }
-
+
if(!getHit())
{
// empty 3D scene; Check for border hit
@@ -293,8 +293,8 @@ namespace drawinglayer
// create new local ViewInformation2D containing transformation
const geometry::ViewInformation2D aViewInformation2D(
- getViewInformation2D().getObjectTransformation() * rTransformCandidate.getTransformation(),
- getViewInformation2D().getViewTransformation(),
+ getViewInformation2D().getObjectTransformation() * rTransformCandidate.getTransformation(),
+ getViewInformation2D().getViewTransformation(),
getViewInformation2D().getViewport(),
getViewInformation2D().getVisualizedPage(),
getViewInformation2D().getViewTime(),
@@ -315,11 +315,11 @@ namespace drawinglayer
{
// create hairline in discrete coordinates
const primitive2d::PolygonHairlinePrimitive2D& rPolygonCandidate(static_cast< const primitive2d::PolygonHairlinePrimitive2D& >(rCandidate));
-
+
// use hairline test
mbHit = checkHairlineHitWithTolerance(rPolygonCandidate.getB2DPolygon(), getDiscreteHitTolerance());
}
-
+
break;
}
case PRIMITIVE2D_ID_POLYGONMARKERPRIMITIVE2D :
@@ -328,11 +328,11 @@ namespace drawinglayer
{
// handle marker like hairline; no need to decompose in dashes
const primitive2d::PolygonMarkerPrimitive2D& rPolygonCandidate(static_cast< const primitive2d::PolygonMarkerPrimitive2D& >(rCandidate));
-
+
// use hairline test
mbHit = checkHairlineHitWithTolerance(rPolygonCandidate.getB2DPolygon(), getDiscreteHitTolerance());
}
-
+
break;
}
case PRIMITIVE2D_ID_POLYGONSTROKEPRIMITIVE2D :
@@ -354,10 +354,10 @@ namespace drawinglayer
else
{
// for all other B2DLINEJOIN_* do a hairline HitTest with expanded tolerance
- const basegfx::B2DVector aDiscreteHalfLineVector(getViewInformation2D().getObjectToViewTransformation()
+ const basegfx::B2DVector aDiscreteHalfLineVector(getViewInformation2D().getObjectToViewTransformation()
* basegfx::B2DVector(rLineAttribute.getWidth() * 0.5, 0.0));
mbHit = checkHairlineHitWithTolerance(
- rPolygonCandidate.getB2DPolygon(),
+ rPolygonCandidate.getB2DPolygon(),
getDiscreteHitTolerance() + aDiscreteHalfLineVector.getLength());
}
}
@@ -368,7 +368,7 @@ namespace drawinglayer
mbHit = checkHairlineHitWithTolerance(rPolygonCandidate.getB2DPolygon(), getDiscreteHitTolerance());
}
}
-
+
break;
}
case PRIMITIVE2D_ID_POLYGONWAVEPRIMITIVE2D :
@@ -378,7 +378,7 @@ namespace drawinglayer
// do not use decompose; just handle like a line with width
const primitive2d::PolygonWavePrimitive2D& rPolygonCandidate(static_cast< const primitive2d::PolygonWavePrimitive2D& >(rCandidate));
double fLogicHitTolerance(0.0);
-
+
// if WaveHeight, grow by it
if(basegfx::fTools::more(rPolygonCandidate.getWaveHeight(), 0.0))
{
@@ -391,11 +391,11 @@ namespace drawinglayer
fLogicHitTolerance += rPolygonCandidate.getLineAttribute().getWidth() * 0.5;
}
- const basegfx::B2DVector aDiscreteHalfLineVector(getViewInformation2D().getObjectToViewTransformation()
+ const basegfx::B2DVector aDiscreteHalfLineVector(getViewInformation2D().getObjectToViewTransformation()
* basegfx::B2DVector(fLogicHitTolerance, 0.0));
-
+
mbHit = checkHairlineHitWithTolerance(
- rPolygonCandidate.getB2DPolygon(),
+ rPolygonCandidate.getB2DPolygon(),
getDiscreteHitTolerance() + aDiscreteHalfLineVector.getLength());
}
@@ -407,7 +407,7 @@ namespace drawinglayer
{
// create filled polyPolygon in discrete coordinates
const primitive2d::PolyPolygonColorPrimitive2D& rPolygonCandidate(static_cast< const primitive2d::PolyPolygonColorPrimitive2D& >(rCandidate));
-
+
// use fill hit test
mbHit = checkFillHitWithTolerance(rPolygonCandidate.getB2DPolyPolygon(), getDiscreteHitTolerance());
}
@@ -423,7 +423,7 @@ namespace drawinglayer
// the children are recursively checked for hit. This may be refined for
// parts where the content is completely transparent if needed.
process(rTransCandidate.getChildren());
-
+
break;
}
case PRIMITIVE2D_ID_MASKPRIMITIVE2D :
@@ -431,7 +431,7 @@ namespace drawinglayer
// create mask in discrete coordinates; only recursively continue
// with content when HitTest position is inside the mask
const primitive2d::MaskPrimitive2D& rMaskCandidate(static_cast< const primitive2d::MaskPrimitive2D& >(rCandidate));
-
+
// use fill hit test
if(checkFillHitWithTolerance(rMaskCandidate.getMask(), getDiscreteHitTolerance()))
{
@@ -488,7 +488,7 @@ namespace drawinglayer
// the BitmapPrimitive2D HitTest to take the contained BotmapEx and it's
// transparency into account
const basegfx::B2DRange aRange(rCandidate.getB2DRange(getViewInformation2D()));
-
+
if(!aRange.isEmpty())
{
const primitive2d::BitmapPrimitive2D& rBitmapCandidate(static_cast< const primitive2d::BitmapPrimitive2D& >(rCandidate));
@@ -498,10 +498,10 @@ namespace drawinglayer
if(rSizePixel.Width() && rSizePixel.Height())
{
basegfx::B2DHomMatrix aBackTransform(
- getViewInformation2D().getObjectToViewTransformation() *
+ getViewInformation2D().getObjectToViewTransformation() *
rBitmapCandidate.getTransform());
aBackTransform.invert();
-
+
const basegfx::B2DPoint aRelativePoint(aBackTransform * getDiscreteHitPosition());
const basegfx::B2DRange aUnitRange(0.0, 0.0, 1.0, 1.0);
@@ -539,7 +539,7 @@ namespace drawinglayer
// - For Bitamps, the mask and/or transparence information may be used
// - For MetaFiles, the MetaFile content may be used
const basegfx::B2DRange aRange(rCandidate.getB2DRange(getViewInformation2D()));
-
+
if(!aRange.isEmpty())
{
const basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(aRange));
@@ -564,7 +564,7 @@ namespace drawinglayer
process(rChildren);
}
}
-
+
break;
}
case PRIMITIVE2D_ID_POINTARRAYPRIMITIVE2D :
@@ -586,14 +586,14 @@ namespace drawinglayer
}
}
}
-
+
break;
}
default :
{
// process recursively
process(rCandidate.get2DDecomposition(getViewInformation2D()));
-
+
break;
}
}