cid#1606940 Check of thread-shared field evades lock acquisition
[LibreOffice.git] / slideshow / source / engine / transitions / clippingfunctor.hxx
blob666aef63bf18cd4b32eecf8065863ce130baba7d
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/vector/b2dsize.hxx>
24 #include <basegfx/matrix/b2dhommatrix.hxx>
25 #include <transitioninfo.hxx>
26 #include "parametricpolypolygon.hxx"
29 namespace slideshow::internal
31 /** Generates the final clipping polygon.
33 This class serves as the functor, which generates the
34 final clipping polygon from a given ParametricPolyPolygon
35 and a TransitionInfo.
37 The ParametricPolyPolygon can be obtained from the
38 ParametricPolyPolygonFactory, see there.
40 The TransitionInfo further parametrizes the polygon
41 generated by the ParametricPolyPolygon, with common
42 modifications such as rotation, flipping, or change of
43 direction. This allows the ParametricPolyPolygonFactory to
44 provide only prototypical shapes, with the ClippingFunctor
45 further customizing the output.
47 class ClippingFunctor
49 public:
50 ClippingFunctor(
51 const ParametricPolyPolygonSharedPtr& rPolygon,
52 const TransitionInfo& rTransitionInfo,
53 bool bDirectionForward,
54 bool bModeIn );
56 /** Generate clip polygon.
58 @param nValue
59 Value to generate the polygon for. Must be in the
60 range [0,1].
62 @param rTargetSize
63 Size the clip polygon should cover. This is typically
64 the size of the object the effect is applied on.
66 ::basegfx::B2DPolyPolygon operator()( double nValue,
67 const ::basegfx::B2DSize& rTargetSize );
69 private:
70 ParametricPolyPolygonSharedPtr mpParametricPoly;
71 ::basegfx::B2DHomMatrix maStaticTransformation;
72 // AW: Not needed
73 // ::basegfx::B2DPolyPolygon maBackgroundRect;
74 bool mbForwardParameterSweep;
75 bool mbSubtractPolygon;
76 const bool mbScaleIsotrophically;
77 bool mbFlip;
83 #endif // INCLUDED_SLIDESHOW_SOURCE_ENGINE_TRANSITIONS_CLIPPINGFUNCTOR_HXX
85 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */