fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / slideshow / source / inc / transitioninfo.hxx
blob5268e7fc9a8df4b3c965a91f51f3b9e9d5953806
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 ReverseMethod
80 /** Ignore direction attribute altogether
81 (if it has no sensible meaning for this transition)
83 REVERSEMETHOD_IGNORE,
85 /** Revert by changing the direction of the parameter sweep
86 (from 1->0 instead of 0->1)
88 REVERSEMETHOD_INVERT_SWEEP,
90 /** Revert by subtracting the generated polygon from the
91 target bound rect
93 REVERSEMETHOD_SUBTRACT_POLYGON,
95 /** Combination of REVERSEMETHOD_INVERT_SWEEP and
96 REVERSEMETHOD_SUBTRACT_POLYGON.
98 REVERSEMETHOD_SUBTRACT_AND_INVERT,
100 /// Reverse by rotating polygon 180 degrees
101 REVERSEMETHOD_ROTATE_180,
103 /// Reverse by flipping polygon at the y (!) axis
104 REVERSEMETHOD_FLIP_X,
106 /// Reverse by flipping polygon at the x (!) axis
107 REVERSEMETHOD_FLIP_Y
110 /** Indicating the method to use when transition
111 should be 'reversed'.
113 @see ReverseMethod
115 ReverseMethod meReverseMethod;
117 /** When true, transition 'out' effects are realized
118 by inverting the parameter sweep direction (1->0
119 instead of 0->1). Otherwise, 'out' effects are
120 realized by changing inside and outside areas of
121 the parametric poly-polygon.
123 bool mbOutInvertsSweep;
125 /** when true, scale clip polygon isotrophically to
126 target size. when false, scale is
127 anisotrophically.
129 bool mbScaleIsotrophically;
132 /// Compare against type and subtype
133 class Comparator
135 sal_Int16 mnTransitionType;
136 sal_Int16 mnTransitionSubType;
137 public:
138 Comparator( sal_Int16 nTransitionType,
139 sal_Int16 nTransitionSubType )
140 : mnTransitionType( nTransitionType ),
141 mnTransitionSubType( nTransitionSubType ) {}
142 bool operator()( const TransitionInfo& rEntry ) const {
143 return rEntry.mnTransitionType == mnTransitionType &&
144 rEntry.mnTransitionSubType == mnTransitionSubType;
149 } // namespace internal
150 } // namespace presentation
152 #endif // INCLUDED_SLIDESHOW_SOURCE_INC_TRANSITIONINFO_HXX
154 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */