2004-11-26 18:04:22 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2005-09-07 19:51:08 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2004-11-26 18:04:22 +00:00
|
|
|
*
|
2005-09-07 19:51:08 +00:00
|
|
|
* $RCSfile: combtransition.hxx,v $
|
2004-11-26 18:04:22 +00:00
|
|
|
*
|
2006-12-13 14:39:37 +00:00
|
|
|
* $Revision: 1.5 $
|
2004-11-26 18:04:22 +00:00
|
|
|
*
|
2006-12-13 14:39:37 +00:00
|
|
|
* last change: $Author: kz $ $Date: 2006-12-13 15:39:37 $
|
2004-11-26 18:04:22 +00:00
|
|
|
*
|
2005-09-07 19:51:08 +00:00
|
|
|
* The Contents of this file are made available subject to
|
|
|
|
* the terms of GNU Lesser General Public License Version 2.1.
|
2004-11-26 18:04:22 +00:00
|
|
|
*
|
|
|
|
*
|
2005-09-07 19:51:08 +00:00
|
|
|
* GNU Lesser General Public License Version 2.1
|
|
|
|
* =============================================
|
|
|
|
* Copyright 2005 by Sun Microsystems, Inc.
|
|
|
|
* 901 San Antonio Road, Palo Alto, CA 94303, USA
|
2004-11-26 18:04:22 +00:00
|
|
|
*
|
2005-09-07 19:51:08 +00:00
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License version 2.1, as published by the Free Software Foundation.
|
2004-11-26 18:04:22 +00:00
|
|
|
*
|
2005-09-07 19:51:08 +00:00
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
2004-11-26 18:04:22 +00:00
|
|
|
*
|
2005-09-07 19:51:08 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
|
|
|
* MA 02111-1307 USA
|
2004-11-26 18:04:22 +00:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
#ifndef _SLIDESHOW_COMBTRANSITION_HXX
|
|
|
|
#define _SLIDESHOW_COMBTRANSITION_HXX
|
|
|
|
|
2006-12-13 14:39:37 +00:00
|
|
|
#include <basegfx/polygon/b2dpolypolygon.hxx>
|
2005-03-10 12:51:18 +00:00
|
|
|
#include "slidechangebase.hxx"
|
2004-11-26 18:04:22 +00:00
|
|
|
|
2006-12-13 14:39:37 +00:00
|
|
|
namespace slideshow {
|
2005-03-10 12:51:18 +00:00
|
|
|
namespace internal {
|
2004-11-26 18:04:22 +00:00
|
|
|
|
2005-03-10 12:51:18 +00:00
|
|
|
/** Comb transition class.
|
2004-11-26 18:04:22 +00:00
|
|
|
|
2005-03-10 12:51:18 +00:00
|
|
|
This class provides a SlideChangeAnimation, showing a
|
|
|
|
comb-like effect (stripes of alternating push effects).
|
|
|
|
*/
|
|
|
|
class CombTransition : public SlideChangeBase
|
2004-11-26 18:04:22 +00:00
|
|
|
{
|
2005-03-10 12:51:18 +00:00
|
|
|
public:
|
|
|
|
/** Create the comb transition effect.
|
|
|
|
|
|
|
|
@param nNumStripes
|
|
|
|
Number of comb-like stripes to show in this effect
|
|
|
|
*/
|
|
|
|
CombTransition( ::boost::optional<SlideSharedPtr> const & leavingSlide,
|
2006-12-13 14:39:37 +00:00
|
|
|
const SlideSharedPtr& pEnteringSlide,
|
|
|
|
const SoundPlayerSharedPtr& pSoundPlayer,
|
|
|
|
const UnoViewContainer& rViewContainer,
|
|
|
|
EventMultiplexer& rEventMultiplexer,
|
|
|
|
const ::basegfx::B2DVector& rPushDirection,
|
|
|
|
sal_Int32 nNumStripes );
|
2005-03-10 12:51:18 +00:00
|
|
|
|
|
|
|
// NumberAnimation
|
|
|
|
virtual bool operator()( double x );
|
|
|
|
|
|
|
|
private:
|
|
|
|
const ::basegfx::B2DVector maPushDirectionUnit;
|
|
|
|
sal_Int32 mnNumStripes;
|
|
|
|
|
2006-12-13 14:39:37 +00:00
|
|
|
void renderComb( double t, const ViewEntry& rViewEntry ) const;
|
2005-03-10 12:51:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace internal
|
|
|
|
} // namespace presentation
|
2004-11-26 18:04:22 +00:00
|
|
|
|
|
|
|
#endif /* _SLIDESHOW_COMBTRANSITION_HXX */
|