1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir 28*cdf0e10cSrcweir #if ! defined INCLUDED_SLIDESHOW_TRANSITIONINFO_HXX 29*cdf0e10cSrcweir #define INCLUDED_SLIDESHOW_TRANSITIONINFO_HXX 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir #include <sal/types.h> 32*cdf0e10cSrcweir 33*cdf0e10cSrcweir 34*cdf0e10cSrcweir namespace slideshow { 35*cdf0e10cSrcweir namespace internal { 36*cdf0e10cSrcweir 37*cdf0e10cSrcweir struct TransitionInfo 38*cdf0e10cSrcweir { 39*cdf0e10cSrcweir // the following two member serve as the search key 40*cdf0e10cSrcweir // for an incoming XTransitionFilter node 41*cdf0e10cSrcweir // 42*cdf0e10cSrcweir // { 43*cdf0e10cSrcweir 44*cdf0e10cSrcweir sal_Int16 mnTransitionType; 45*cdf0e10cSrcweir sal_Int16 mnTransitionSubType; 46*cdf0e10cSrcweir 47*cdf0e10cSrcweir // } 48*cdf0e10cSrcweir // 49*cdf0e10cSrcweir 50*cdf0e10cSrcweir /** This enum classifies a transition type 51*cdf0e10cSrcweir */ 52*cdf0e10cSrcweir enum TransitionClass 53*cdf0e10cSrcweir { 54*cdf0e10cSrcweir /// Invalid type 55*cdf0e10cSrcweir TRANSITION_INVALID, 56*cdf0e10cSrcweir 57*cdf0e10cSrcweir /// Transition expressed by parametric clip polygon 58*cdf0e10cSrcweir TRANSITION_CLIP_POLYPOLYGON, 59*cdf0e10cSrcweir 60*cdf0e10cSrcweir /// Transition expressed by hand-crafted function 61*cdf0e10cSrcweir TRANSITION_SPECIAL 62*cdf0e10cSrcweir }; 63*cdf0e10cSrcweir 64*cdf0e10cSrcweir /// class of effect handling 65*cdf0e10cSrcweir TransitionClass meTransitionClass; 66*cdf0e10cSrcweir 67*cdf0e10cSrcweir /// Rotation angle of clip polygon 68*cdf0e10cSrcweir double mnRotationAngle; 69*cdf0e10cSrcweir 70*cdf0e10cSrcweir /// X scaling of clip polygon (negative values mirror) 71*cdf0e10cSrcweir double mnScaleX; 72*cdf0e10cSrcweir 73*cdf0e10cSrcweir /// Y scaling of clip polygon (negative values mirror) 74*cdf0e10cSrcweir double mnScaleY; 75*cdf0e10cSrcweir 76*cdf0e10cSrcweir /** This enum determines the method how to reverse 77*cdf0e10cSrcweir a parametric clip polygon transition. 78*cdf0e10cSrcweir 79*cdf0e10cSrcweir A reversed transition runs in the geometrically 80*cdf0e10cSrcweir opposite direction. For a left-to-right bar wipe, the 81*cdf0e10cSrcweir reversed transition is a right-to-left wipe, whereas 82*cdf0e10cSrcweir for an iris transition, the reversed mode will show 83*cdf0e10cSrcweir the target in the outer area (instead of in the inner 84*cdf0e10cSrcweir area, as in normal mode). 85*cdf0e10cSrcweir */ 86*cdf0e10cSrcweir enum ReverseMethod 87*cdf0e10cSrcweir { 88*cdf0e10cSrcweir /** Ignore direction attribute altogether 89*cdf0e10cSrcweir (if it has no sensible meaning for this transition) 90*cdf0e10cSrcweir */ 91*cdf0e10cSrcweir REVERSEMETHOD_IGNORE, 92*cdf0e10cSrcweir 93*cdf0e10cSrcweir /** Revert by changing the direction of the parameter sweep 94*cdf0e10cSrcweir (from 1->0 instead of 0->1) 95*cdf0e10cSrcweir */ 96*cdf0e10cSrcweir REVERSEMETHOD_INVERT_SWEEP, 97*cdf0e10cSrcweir 98*cdf0e10cSrcweir /** Revert by subtracting the generated polygon from the 99*cdf0e10cSrcweir target bound rect 100*cdf0e10cSrcweir */ 101*cdf0e10cSrcweir REVERSEMETHOD_SUBTRACT_POLYGON, 102*cdf0e10cSrcweir 103*cdf0e10cSrcweir /** Combination of REVERSEMETHOD_INVERT_SWEEP and 104*cdf0e10cSrcweir REVERSEMETHOD_SUBTRACT_POLYGON. 105*cdf0e10cSrcweir */ 106*cdf0e10cSrcweir REVERSEMETHOD_SUBTRACT_AND_INVERT, 107*cdf0e10cSrcweir 108*cdf0e10cSrcweir /// Reverse by rotating polygon 180 degrees 109*cdf0e10cSrcweir REVERSEMETHOD_ROTATE_180, 110*cdf0e10cSrcweir 111*cdf0e10cSrcweir /// Reverse by flipping polygon at the y (!) axis 112*cdf0e10cSrcweir REVERSEMETHOD_FLIP_X, 113*cdf0e10cSrcweir 114*cdf0e10cSrcweir /// Reverse by flipping polygon at the x (!) axis 115*cdf0e10cSrcweir REVERSEMETHOD_FLIP_Y 116*cdf0e10cSrcweir }; 117*cdf0e10cSrcweir 118*cdf0e10cSrcweir /** Indicating the method to use when transition 119*cdf0e10cSrcweir should be 'reversed'. 120*cdf0e10cSrcweir 121*cdf0e10cSrcweir @see ReverseMethod 122*cdf0e10cSrcweir */ 123*cdf0e10cSrcweir ReverseMethod meReverseMethod; 124*cdf0e10cSrcweir 125*cdf0e10cSrcweir /** When true, transition 'out' effects are realized 126*cdf0e10cSrcweir by inverting the parameter sweep direction (1->0 127*cdf0e10cSrcweir instead of 0->1). Otherwise, 'out' effects are 128*cdf0e10cSrcweir realized by changing inside and outside areas of 129*cdf0e10cSrcweir the parametric poly-polygon. 130*cdf0e10cSrcweir */ 131*cdf0e10cSrcweir bool mbOutInvertsSweep; 132*cdf0e10cSrcweir 133*cdf0e10cSrcweir /** when true, scale clip polygon isotrophically to 134*cdf0e10cSrcweir target size. when false, scale is 135*cdf0e10cSrcweir anisotrophically. 136*cdf0e10cSrcweir */ 137*cdf0e10cSrcweir bool mbScaleIsotrophically; 138*cdf0e10cSrcweir 139*cdf0e10cSrcweir 140*cdf0e10cSrcweir /// Compare against type and subtype 141*cdf0e10cSrcweir class Comparator 142*cdf0e10cSrcweir { 143*cdf0e10cSrcweir sal_Int16 mnTransitionType; 144*cdf0e10cSrcweir sal_Int16 mnTransitionSubType; 145*cdf0e10cSrcweir public: 146*cdf0e10cSrcweir Comparator( sal_Int16 nTransitionType, 147*cdf0e10cSrcweir sal_Int16 nTransitionSubType ) 148*cdf0e10cSrcweir : mnTransitionType( nTransitionType ), 149*cdf0e10cSrcweir mnTransitionSubType( nTransitionSubType ) {} 150*cdf0e10cSrcweir bool operator()( const TransitionInfo& rEntry ) const { 151*cdf0e10cSrcweir return rEntry.mnTransitionType == mnTransitionType && 152*cdf0e10cSrcweir rEntry.mnTransitionSubType == mnTransitionSubType; 153*cdf0e10cSrcweir } 154*cdf0e10cSrcweir }; 155*cdf0e10cSrcweir }; 156*cdf0e10cSrcweir 157*cdf0e10cSrcweir } // namespace internal 158*cdf0e10cSrcweir } // namespace presentation 159*cdf0e10cSrcweir 160*cdf0e10cSrcweir #endif /* INCLUDED_SLIDESHOW_TRANSITIONINFO_HXX */ 161