LCOV - code coverage report
Current view: top level - slideshow/source/engine/transitions - parametricpolypolygon.hxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 2 0.0 %
Date: 2014-04-14 Functions: 0 3 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       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/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      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 .
      18             :  */
      19             : 
      20             : #ifndef INCLUDED_SLIDESHOW_PARAMETRICPOLYPOLYGON_HXX
      21             : #define INCLUDED_SLIDESHOW_PARAMETRICPOLYPOLYGON_HXX
      22             : 
      23             : #include <basegfx/polygon/b2dpolypolygon.hxx>
      24             : #include <boost/shared_ptr.hpp>
      25             : 
      26             : 
      27             : /* Definition of ParametricPolyPolygon interface */
      28             : 
      29             : namespace slideshow
      30             : {
      31             :     namespace internal
      32             :     {
      33             :         /** Interface defining a parametric poly-polygon.
      34             : 
      35             :             This interface defines a poly-polygon, whose actual shape
      36             :             is parameterized by a floating point value. This is
      37             :             e.g. used to generically access the various clip polygon
      38             :             generators for transition effects.
      39             : 
      40             :             Since for every parametric poly-polygon, there is a set of
      41             :             variations, which can easily be generated by simple
      42             :             transformations or change in parameter range sweep
      43             :             direction, objects implementing this interface only
      44             :             generate <em>one</em> prototypical instance of the
      45             :             parametric poly-polygon. Generally speaking, the main
      46             :             effect direction should be horizontal, it should make
      47             :             increasingly more area visible (transition 'in'), and when
      48             :             there is a designated direction given, that should be
      49             :             left-to-right.
      50             :          */
      51           0 :         class ParametricPolyPolygon
      52             :         {
      53             :         public:
      54           0 :             virtual ~ParametricPolyPolygon() {}
      55             : 
      56             :             /** Retrieve the poly-polygon for value t.
      57             : 
      58             :                 @param t
      59             :                 Current parameter value to retrieve the corresponding
      60             :                 poly-polygon for. Permissible values for t must be in
      61             :                 the range [0,1].
      62             : 
      63             :                 @return a poly-polygon corresponding to the given
      64             :                 parameter value. The poly-polygon is interpreted as
      65             :                 living in the unit rectangle (i.e. [0,1]x[0,1]), but
      66             :                 is not necessarily constrained to completely lie in
      67             :                 this area (this very much depends on the actual effect
      68             :                 to be generated). Although, from a performance
      69             :                 perspective, it currently <em>is</em> advantageous to
      70             :                 try to keep the poly-polygon within these bounds (at
      71             :                 least if there are no hard reasons not to do so),
      72             :                 because then reversion or out transformations are
      73             :                 potentially faster to compute (see the
      74             :                 TransitionInfo::meReverseMethod member in
      75             :                 transitionfactory.cxx). Furthermore, if one of the
      76             :                 polygon modifications involve subtraction (also see
      77             :                 TransitionInfo::meReverseMethod), all generated
      78             :                 polygons should be oriented clock-wise
      79             :                 (i.e. traversing the polygon vertices with increasing
      80             :                 vertex index should generate a clock-wise movement).
      81             :              */
      82             :             virtual ::basegfx::B2DPolyPolygon operator()( double t ) = 0;
      83             :         };
      84             : 
      85             :         typedef ::boost::shared_ptr< ParametricPolyPolygon > ParametricPolyPolygonSharedPtr;
      86             : 
      87             :     }
      88             : }
      89             : 
      90             : #endif /* INCLUDED_SLIDESHOW_PARAMETRICPOLYPOLYGON_HXX */
      91             : 
      92             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10