1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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::internal
{
30 // the following two member serve as the search key
31 // for an incoming XTransitionFilter node
35 sal_Int16 mnTransitionType
;
36 sal_Int16 mnTransitionSubType
;
41 /** This enum classifies a transition type
48 /// Transition expressed by parametric clip polygon
49 TRANSITION_CLIP_POLYPOLYGON
,
51 /// Transition expressed by hand-crafted function
55 /// class of effect handling
56 TransitionClass meTransitionClass
;
58 /// Rotation angle of clip polygon
59 double mnRotationAngle
;
61 /// X scaling of clip polygon (negative values mirror)
64 /// Y scaling of clip polygon (negative values mirror)
67 /** This enum determines the method how to reverse
68 a parametric clip polygon transition.
70 A reversed transition runs in the geometrically
71 opposite direction. For a left-to-right bar wipe, the
72 reversed transition is a right-to-left wipe, whereas
73 for an iris transition, the reversed mode will show
74 the target in the outer area (instead of in the inner
75 area, as in normal mode).
77 enum class ReverseMethod
79 /** Ignore direction attribute altogether
80 (if it has no sensible meaning for this transition)
84 /** Combination of ReverseMethod::InvertSweep and
85 ReverseMethod::SubtractPolygon.
89 /// Reverse by rotating polygon 180 degrees
92 /// Reverse by flipping polygon at the y (!) axis
95 /// Reverse by flipping polygon at the x (!) axis
99 /** Indicating the method to use when transition
100 should be 'reversed'.
104 ReverseMethod meReverseMethod
;
106 /** When true, transition 'out' effects are realized
107 by inverting the parameter sweep direction (1->0
108 instead of 0->1). Otherwise, 'out' effects are
109 realized by changing inside and outside areas of
110 the parametric poly-polygon.
112 bool mbOutInvertsSweep
;
114 /** when true, scale clip polygon isotropically to
115 target size. when false, scale is
118 bool mbScaleIsotrophically
;
121 /// Compare against type and subtype
124 sal_Int16 mnTransitionType
;
125 sal_Int16 mnTransitionSubType
;
127 Comparator( sal_Int16 nTransitionType
,
128 sal_Int16 nTransitionSubType
)
129 : mnTransitionType( nTransitionType
),
130 mnTransitionSubType( nTransitionSubType
) {}
131 bool operator()( const TransitionInfo
& rEntry
) const {
132 return rEntry
.mnTransitionType
== mnTransitionType
&&
133 rEntry
.mnTransitionSubType
== mnTransitionSubType
;
138 } // namespace presentation::internal
140 #endif // INCLUDED_SLIDESHOW_SOURCE_INC_TRANSITIONINFO_HXX
142 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */