1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef _CPPCANVAS_IMPLSPRITE_HXX
29 #define _CPPCANVAS_IMPLSPRITE_HXX
30 
31 #include <com/sun/star/uno/Reference.hxx>
32 #include <com/sun/star/rendering/XSpriteCanvas.hpp>
33 #include <com/sun/star/rendering/XSprite.hpp>
34 
35 #ifndef BOOST_SHARED_PTR_HPP_INCLUDED
36 #include <boost/shared_ptr.hpp>
37 #endif
38 #include <cppcanvas/sprite.hxx>
39 
40 #include <implspritecanvas.hxx>
41 
42 
43 namespace cppcanvas
44 {
45     namespace internal
46     {
47         class ImplSprite : public virtual Sprite
48         {
49         public:
50             ImplSprite( const ::com::sun::star::uno::Reference<
51                               	::com::sun::star::rendering::XSpriteCanvas >& 	rParentCanvas,
52                         const ::com::sun::star::uno::Reference<
53                               	::com::sun::star::rendering::XSprite >& 		rSprite,
54                         const ImplSpriteCanvas::TransformationArbiterSharedPtr&			rTransformArbiter );
55             ImplSprite( const ::com::sun::star::uno::Reference<
56                               	::com::sun::star::rendering::XSpriteCanvas >& 	rParentCanvas,
57                         const ::com::sun::star::uno::Reference<
58                               	::com::sun::star::rendering::XAnimatedSprite >& rSprite,
59                         const ImplSpriteCanvas::TransformationArbiterSharedPtr&			rTransformArbiter );
60             virtual ~ImplSprite();
61 
62             virtual void setAlpha( const double& rAlpha );
63             virtual void movePixel( const ::basegfx::B2DPoint& rNewPos );
64             virtual void move( const ::basegfx::B2DPoint& rNewPos );
65             virtual void transform( const ::basegfx::B2DHomMatrix& rMatrix );
66             virtual void setClipPixel( const ::basegfx::B2DPolyPolygon& rClipPoly );
67             virtual void setClip( const ::basegfx::B2DPolyPolygon& rClipPoly );
68             virtual void setClip();
69 
70             virtual void show();
71             virtual void hide();
72 
73             virtual void setPriority( double fPriority );
74 
75             virtual ::com::sun::star::uno::Reference<
76                 ::com::sun::star::rendering::XSprite > 	getUNOSprite() const;
77 
78             ::com::sun::star::uno::Reference<
79 				::com::sun::star::rendering::XGraphicDevice >
80 													            getGraphicDevice() const;
81 
82         private:
83             // default: disabled copy/assignment
84             ImplSprite(const ImplSprite&);
85             ImplSprite& operator=( const ImplSprite& );
86 
87             ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice > 		mxGraphicDevice;
88             const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XSprite > 			mxSprite;
89             const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XAnimatedSprite > 	mxAnimatedSprite;
90             ImplSpriteCanvas::TransformationArbiterSharedPtr										mpTransformArbiter;
91 		};
92 	}
93 }
94 
95 #endif /* _CPPCANVAS_IMPLSPRITE_HXX */
96