bump product version to 5.0.4.1
[LibreOffice.git] / slideshow / source / engine / transitions / clippingfunctor.hxx
blob954b7995fae3d47b3120cb251f720dde76d0c041
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_ENGINE_TRANSITIONS_CLIPPINGFUNCTOR_HXX
21 #define INCLUDED_SLIDESHOW_SOURCE_ENGINE_TRANSITIONS_CLIPPINGFUNCTOR_HXX
23 #include <basegfx/numeric/ftools.hxx>
24 #include <basegfx/vector/b2dsize.hxx>
25 #include <basegfx/matrix/b2dhommatrix.hxx>
26 #include <basegfx/polygon/b2dpolypolygontools.hxx>
27 #include <transitioninfo.hxx>
28 #include <parametricpolypolygon.hxx>
31 namespace slideshow
33 namespace internal
35 /** Generates the final clipping polygon.
37 This class serves as the functor, which generates the
38 final clipping polygon from a given ParametricPolyPolygon
39 and a TransitionInfo.
41 The ParametricPolyPolygon can be obtained from the
42 ParametricPolyPolygonFactory, see there.
44 The TransitionInfo further parameterizes the polygon
45 generated by the ParametricPolyPolygon, with common
46 modifications such as rotation, flipping, or change of
47 direction. This allows the ParametricPolyPolygonFactory to
48 provide only prototypical shapes, with the ClippingFunctor
49 further customizing the output.
51 class ClippingFunctor
53 public:
54 ClippingFunctor(
55 const ParametricPolyPolygonSharedPtr& rPolygon,
56 const TransitionInfo& rTransitionInfo,
57 bool bDirectionForward,
58 bool bModeIn );
60 /** Generate clip polygon.
62 @param nValue
63 Value to generate the polygon for. Must be in the
64 range [0,1].
66 @param rTargetSize
67 Size the clip polygon should cover. This is typically
68 the size of the object the effect is applied on.
70 ::basegfx::B2DPolyPolygon operator()( double nValue,
71 const ::basegfx::B2DSize& rTargetSize );
73 private:
74 ParametricPolyPolygonSharedPtr mpParametricPoly;
75 ::basegfx::B2DHomMatrix maStaticTransformation;
76 // AW: Not needed
77 // ::basegfx::B2DPolyPolygon maBackgroundRect;
78 bool mbForwardParameterSweep;
79 bool mbSubtractPolygon;
80 const bool mbScaleIsotrophically;
81 bool mbFlip;
87 #endif // INCLUDED_SLIDESHOW_SOURCE_ENGINE_TRANSITIONS_CLIPPINGFUNCTOR_HXX
89 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */