android: Update app-specific/MIME type icons
[LibreOffice.git] / slideshow / source / engine / transitions / parametricpolypolygon.hxx
blob4e2ebb98ec67d6b1ce3895ca5df97a7a18b4d53a
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_PARAMETRICPOLYPOLYGON_HXX
21 #define INCLUDED_SLIDESHOW_SOURCE_ENGINE_TRANSITIONS_PARAMETRICPOLYPOLYGON_HXX
23 #include <basegfx/polygon/b2dpolypolygon.hxx>
24 #include <memory>
27 /* Definition of ParametricPolyPolygon interface */
29 namespace slideshow::internal
31 /** Interface defining a parametric poly-polygon.
33 This interface defines a poly-polygon, whose actual shape
34 is parameterized by a floating point value. This is
35 e.g. used to generically access the various clip polygon
36 generators for transition effects.
38 Since for every parametric poly-polygon, there is a set of
39 variations, which can easily be generated by simple
40 transformations or change in parameter range sweep
41 direction, objects implementing this interface only
42 generate <em>one</em> prototypical instance of the
43 parametric poly-polygon. Generally speaking, the main
44 effect direction should be horizontal, it should make
45 increasingly more area visible (transition 'in'), and when
46 there is a designated direction given, that should be
47 left-to-right.
49 class ParametricPolyPolygon
51 public:
52 virtual ~ParametricPolyPolygon() {}
54 /** Retrieve the poly-polygon for value t.
56 @param t
57 Current parameter value to retrieve the corresponding
58 poly-polygon for. Permissible values for t must be in
59 the range [0,1].
61 @return a poly-polygon corresponding to the given
62 parameter value. The poly-polygon is interpreted as
63 living in the unit rectangle (i.e. [0,1]x[0,1]), but
64 is not necessarily constrained to completely lie in
65 this area (this very much depends on the actual effect
66 to be generated). Although, from a performance
67 perspective, it currently <em>is</em> advantageous to
68 try to keep the poly-polygon within these bounds (at
69 least if there are no hard reasons not to do so),
70 because then reversion or out transformations are
71 potentially faster to compute (see the
72 TransitionInfo::meReverseMethod member in
73 transitionfactory.cxx). Furthermore, if one of the
74 polygon modifications involve subtraction (also see
75 TransitionInfo::meReverseMethod), all generated
76 polygons should be oriented clock-wise
77 (i.e. traversing the polygon vertices with increasing
78 vertex index should generate a clock-wise movement).
80 virtual ::basegfx::B2DPolyPolygon operator()( double t ) = 0;
83 typedef ::std::shared_ptr< ParametricPolyPolygon > ParametricPolyPolygonSharedPtr;
87 #endif // INCLUDED_SLIDESHOW_SOURCE_ENGINE_TRANSITIONS_PARAMETRICPOLYPOLYGON_HXX
89 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */