Bump version to 6.0-36
[LibreOffice.git] / slideshow / source / inc / transitioninfo.hxx
blob241771bec5f94adc505685e6802f01415884afa3
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_SLIDESHOW_SOURCE_INC_TRANSITIONINFO_HXX
21 #define INCLUDED_SLIDESHOW_SOURCE_INC_TRANSITIONINFO_HXX
23 #include <sal/types.h>
26 namespace slideshow {
27 namespace internal {
29 struct TransitionInfo
31 // the following two member serve as the search key
32 // for an incoming XTransitionFilter node
34 // {
36 sal_Int16 mnTransitionType;
37 sal_Int16 mnTransitionSubType;
39 // }
42 /** This enum classifies a transition type
44 enum TransitionClass
46 /// Invalid type
47 TRANSITION_INVALID,
49 /// Transition expressed by parametric clip polygon
50 TRANSITION_CLIP_POLYPOLYGON,
52 /// Transition expressed by hand-crafted function
53 TRANSITION_SPECIAL
56 /// class of effect handling
57 TransitionClass meTransitionClass;
59 /// Rotation angle of clip polygon
60 double mnRotationAngle;
62 /// X scaling of clip polygon (negative values mirror)
63 double mnScaleX;
65 /// Y scaling of clip polygon (negative values mirror)
66 double mnScaleY;
68 /** This enum determines the method how to reverse
69 a parametric clip polygon transition.
71 A reversed transition runs in the geometrically
72 opposite direction. For a left-to-right bar wipe, the
73 reversed transition is a right-to-left wipe, whereas
74 for an iris transition, the reversed mode will show
75 the target in the outer area (instead of in the inner
76 area, as in normal mode).
78 enum class ReverseMethod
80 /** Ignore direction attribute altogether
81 (if it has no sensible meaning for this transition)
83 Ignore,
85 /** Combination of ReverseMethod::InvertSweep and
86 ReverseMethod::SubtractPolygon.
88 SubtractAndInvert,
90 /// Reverse by rotating polygon 180 degrees
91 Rotate180,
93 /// Reverse by flipping polygon at the y (!) axis
94 FlipX,
96 /// Reverse by flipping polygon at the x (!) axis
97 FlipY
100 /** Indicating the method to use when transition
101 should be 'reversed'.
103 @see ReverseMethod
105 ReverseMethod meReverseMethod;
107 /** When true, transition 'out' effects are realized
108 by inverting the parameter sweep direction (1->0
109 instead of 0->1). Otherwise, 'out' effects are
110 realized by changing inside and outside areas of
111 the parametric poly-polygon.
113 bool mbOutInvertsSweep;
115 /** when true, scale clip polygon isotropically to
116 target size. when false, scale is
117 anisotropically.
119 bool mbScaleIsotrophically;
122 /// Compare against type and subtype
123 class Comparator
125 sal_Int16 mnTransitionType;
126 sal_Int16 mnTransitionSubType;
127 public:
128 Comparator( sal_Int16 nTransitionType,
129 sal_Int16 nTransitionSubType )
130 : mnTransitionType( nTransitionType ),
131 mnTransitionSubType( nTransitionSubType ) {}
132 bool operator()( const TransitionInfo& rEntry ) const {
133 return rEntry.mnTransitionType == mnTransitionType &&
134 rEntry.mnTransitionSubType == mnTransitionSubType;
139 } // namespace internal
140 } // namespace presentation
142 #endif // INCLUDED_SLIDESHOW_SOURCE_INC_TRANSITIONINFO_HXX
144 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */