LibreOffice Module slideshow (master) 1
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
slideshow::internal::SnakeWipe Class Reference

Generates a snake wipe: More...

#include <snakewipe.hxx>

Inheritance diagram for slideshow::internal::SnakeWipe:
[legend]
Collaboration diagram for slideshow::internal::SnakeWipe:
[legend]

Public Member Functions

 SnakeWipe (sal_Int32 nElements, bool diagonal, bool flipOnYAxis)
 
virtual ::basegfx::B2DPolyPolygon operator() (double t) override
 Retrieve the poly-polygon for value t. More...
 
- Public Member Functions inherited from slideshow::internal::ParametricPolyPolygon
virtual ~ParametricPolyPolygon ()
 
virtual ::basegfx::B2DPolyPolygon operator() (double t)=0
 Retrieve the poly-polygon for value t. More...
 

Protected Member Functions

::basegfx::B2DPolyPolygon calcSnake (double t) const
 
::basegfx::B2DPolyPolygon calcHalfDiagonalSnake (double t, bool in) const
 

Protected Attributes

const sal_Int32 m_sqrtElements
 
const double m_elementEdge
 
const bool m_diagonal
 
const bool m_flipOnYAxis
 

Detailed Description

Generates a snake wipe:

Definition at line 29 of file snakewipe.hxx.

Constructor & Destructor Documentation

◆ SnakeWipe()

slideshow::internal::SnakeWipe::SnakeWipe ( sal_Int32  nElements,
bool  diagonal,
bool  flipOnYAxis 
)

Definition at line 36 of file snakewipe.cxx.

References nElements.

Member Function Documentation

◆ calcHalfDiagonalSnake()

basegfx::B2DPolyPolygon slideshow::internal::SnakeWipe::calcHalfDiagonalSnake ( double  t,
bool  in 
) const
protected

◆ calcSnake()

basegfx::B2DPolyPolygon slideshow::internal::SnakeWipe::calcSnake ( double  t) const
protected

◆ operator()()

basegfx::B2DPolyPolygon slideshow::internal::SnakeWipe::operator() ( double  t)
overridevirtual

Retrieve the poly-polygon for value t.

Parameters
tCurrent parameter value to retrieve the corresponding poly-polygon for. Permissible values for t must be in the range [0,1].
Returns
a poly-polygon corresponding to the given parameter value. The poly-polygon is interpreted as living in the unit rectangle (i.e. [0,1]x[0,1]), but is not necessarily constrained to completely lie in this area (this very much depends on the actual effect to be generated). Although, from a performance perspective, it currently is advantageous to try to keep the poly-polygon within these bounds (at least if there are no hard reasons not to do so), because then reversion or out transformations are potentially faster to compute (see the TransitionInfo::meReverseMethod member in transitionfactory.cxx). Furthermore, if one of the polygon modifications involve subtraction (also see TransitionInfo::meReverseMethod), all generated polygons should be oriented clock-wise (i.e. traversing the polygon vertices with increasing vertex index should generate a clock-wise movement).

Implements slideshow::internal::ParametricPolyPolygon.

Reimplemented in slideshow::internal::ParallelSnakesWipe.

Definition at line 179 of file snakewipe.cxx.

References basegfx::B2DPolyPolygon::append(), calcHalfDiagonalSnake(), calcSnake(), slideshow::internal::flipOnYAxis(), m_diagonal, m_flipOnYAxis, and t.

Member Data Documentation

◆ m_diagonal

const bool slideshow::internal::SnakeWipe::m_diagonal
protected

◆ m_elementEdge

const double slideshow::internal::SnakeWipe::m_elementEdge
protected

Definition at line 42 of file snakewipe.hxx.

Referenced by calcHalfDiagonalSnake(), and calcSnake().

◆ m_flipOnYAxis

const bool slideshow::internal::SnakeWipe::m_flipOnYAxis
protected

◆ m_sqrtElements

const sal_Int32 slideshow::internal::SnakeWipe::m_sqrtElements
protected

Definition at line 41 of file snakewipe.hxx.

Referenced by calcHalfDiagonalSnake(), and calcSnake().


The documentation for this class was generated from the following files: