convert ReverseMethod to scoped enum
and drop unused enumerators REVERSEMETHOD_INVERT_SWEEP REVERSEMETHOD_SUBTRACT_POLYGON Change-Id: I11b52d4b32e5f766dfa3bcd69b9c636f4106b7b4
This commit is contained in:
@@ -65,8 +65,8 @@ namespace slideshow
|
||||
// perform general transformations _before_ the reverse
|
||||
// mode changes. This allows the Transition table to be
|
||||
// filled more consistently (otherwise, when e.g. rotating
|
||||
// a clip 90 degrees, the REVERSEMETHOD_FLIP_X becomes
|
||||
// REVERSEMETHOD_FLIP_Y instead)
|
||||
// a clip 90 degrees, the ReverseMethod::FlipX becomes
|
||||
// ReverseMethod::FlipY instead)
|
||||
if (rTransitionInfo.mnRotationAngle != 0.0 ||
|
||||
rTransitionInfo.mnScaleX != 1.0 ||
|
||||
rTransitionInfo.mnScaleY != 1.0)
|
||||
@@ -101,34 +101,26 @@ namespace slideshow
|
||||
"TransitionFactory::TransitionFactory(): Unexpected reverse method" );
|
||||
break;
|
||||
|
||||
case TransitionInfo::REVERSEMETHOD_IGNORE:
|
||||
case TransitionInfo::ReverseMethod::Ignore:
|
||||
break;
|
||||
|
||||
case TransitionInfo::REVERSEMETHOD_INVERT_SWEEP:
|
||||
mbForwardParameterSweep = !mbForwardParameterSweep;
|
||||
break;
|
||||
|
||||
case TransitionInfo::REVERSEMETHOD_SUBTRACT_POLYGON:
|
||||
mbSubtractPolygon = !mbSubtractPolygon;
|
||||
break;
|
||||
|
||||
case TransitionInfo::REVERSEMETHOD_SUBTRACT_AND_INVERT:
|
||||
case TransitionInfo::ReverseMethod::SubtractAndInvert:
|
||||
mbForwardParameterSweep = !mbForwardParameterSweep;
|
||||
mbSubtractPolygon = !mbSubtractPolygon;
|
||||
break;
|
||||
|
||||
case TransitionInfo::REVERSEMETHOD_ROTATE_180:
|
||||
case TransitionInfo::ReverseMethod::Rotate180:
|
||||
maStaticTransformation = basegfx::tools::createRotateAroundPoint(0.5, 0.5, M_PI)
|
||||
* maStaticTransformation;
|
||||
break;
|
||||
|
||||
case TransitionInfo::REVERSEMETHOD_FLIP_X:
|
||||
case TransitionInfo::ReverseMethod::FlipX:
|
||||
maStaticTransformation = basegfx::tools::createScaleTranslateB2DHomMatrix(-1.0, 1.0, 1.0, 0.0)
|
||||
* maStaticTransformation;
|
||||
mbFlip = true;
|
||||
break;
|
||||
|
||||
case TransitionInfo::REVERSEMETHOD_FLIP_Y:
|
||||
case TransitionInfo::ReverseMethod::FlipY:
|
||||
maStaticTransformation = basegfx::tools::createScaleTranslateB2DHomMatrix(1.0, -1.0, 0.0, 1.0)
|
||||
* maStaticTransformation;
|
||||
mbFlip = true;
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -75,36 +75,26 @@ struct TransitionInfo
|
||||
the target in the outer area (instead of in the inner
|
||||
area, as in normal mode).
|
||||
*/
|
||||
enum ReverseMethod
|
||||
enum class ReverseMethod
|
||||
{
|
||||
/** Ignore direction attribute altogether
|
||||
(if it has no sensible meaning for this transition)
|
||||
*/
|
||||
REVERSEMETHOD_IGNORE,
|
||||
Ignore,
|
||||
|
||||
/** Revert by changing the direction of the parameter sweep
|
||||
(from 1->0 instead of 0->1)
|
||||
/** Combination of ReverseMethod::InvertSweep and
|
||||
ReverseMethod::SubtractPolygon.
|
||||
*/
|
||||
REVERSEMETHOD_INVERT_SWEEP,
|
||||
|
||||
/** Revert by subtracting the generated polygon from the
|
||||
target bound rect
|
||||
*/
|
||||
REVERSEMETHOD_SUBTRACT_POLYGON,
|
||||
|
||||
/** Combination of REVERSEMETHOD_INVERT_SWEEP and
|
||||
REVERSEMETHOD_SUBTRACT_POLYGON.
|
||||
*/
|
||||
REVERSEMETHOD_SUBTRACT_AND_INVERT,
|
||||
SubtractAndInvert,
|
||||
|
||||
/// Reverse by rotating polygon 180 degrees
|
||||
REVERSEMETHOD_ROTATE_180,
|
||||
Rotate180,
|
||||
|
||||
/// Reverse by flipping polygon at the y (!) axis
|
||||
REVERSEMETHOD_FLIP_X,
|
||||
FlipX,
|
||||
|
||||
/// Reverse by flipping polygon at the x (!) axis
|
||||
REVERSEMETHOD_FLIP_Y
|
||||
FlipY
|
||||
};
|
||||
|
||||
/** Indicating the method to use when transition
|
||||
|
Reference in New Issue
Block a user