1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _CPPCANVAS_IMPLSPRITE_HXX
25 #define _CPPCANVAS_IMPLSPRITE_HXX
26 
27 #include <com/sun/star/uno/Reference.hxx>
28 #include <com/sun/star/rendering/XSpriteCanvas.hpp>
29 #include <com/sun/star/rendering/XSprite.hpp>
30 
31 #ifndef BOOST_SHARED_PTR_HPP_INCLUDED
32 #include <boost/shared_ptr.hpp>
33 #endif
34 #include <cppcanvas/sprite.hxx>
35 
36 #include <implspritecanvas.hxx>
37 
38 
39 namespace cppcanvas
40 {
41     namespace internal
42     {
43         class ImplSprite : public virtual Sprite
44         {
45         public:
46             ImplSprite( const ::com::sun::star::uno::Reference<
47                               	::com::sun::star::rendering::XSpriteCanvas >& 	rParentCanvas,
48                         const ::com::sun::star::uno::Reference<
49                               	::com::sun::star::rendering::XSprite >& 		rSprite,
50                         const ImplSpriteCanvas::TransformationArbiterSharedPtr&			rTransformArbiter );
51             ImplSprite( const ::com::sun::star::uno::Reference<
52                               	::com::sun::star::rendering::XSpriteCanvas >& 	rParentCanvas,
53                         const ::com::sun::star::uno::Reference<
54                               	::com::sun::star::rendering::XAnimatedSprite >& rSprite,
55                         const ImplSpriteCanvas::TransformationArbiterSharedPtr&			rTransformArbiter );
56             virtual ~ImplSprite();
57 
58             virtual void setAlpha( const double& rAlpha );
59             virtual void movePixel( const ::basegfx::B2DPoint& rNewPos );
60             virtual void move( const ::basegfx::B2DPoint& rNewPos );
61             virtual void transform( const ::basegfx::B2DHomMatrix& rMatrix );
62             virtual void setClipPixel( const ::basegfx::B2DPolyPolygon& rClipPoly );
63             virtual void setClip( const ::basegfx::B2DPolyPolygon& rClipPoly );
64             virtual void setClip();
65 
66             virtual void show();
67             virtual void hide();
68 
69             virtual void setPriority( double fPriority );
70 
71             virtual ::com::sun::star::uno::Reference<
72                 ::com::sun::star::rendering::XSprite > 	getUNOSprite() const;
73 
74             ::com::sun::star::uno::Reference<
75 				::com::sun::star::rendering::XGraphicDevice >
76 													            getGraphicDevice() const;
77 
78         private:
79             // default: disabled copy/assignment
80             ImplSprite(const ImplSprite&);
81             ImplSprite& operator=( const ImplSprite& );
82 
83             ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice > 		mxGraphicDevice;
84             const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XSprite > 			mxSprite;
85             const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XAnimatedSprite > 	mxAnimatedSprite;
86             ImplSpriteCanvas::TransformationArbiterSharedPtr										mpTransformArbiter;
87 		};
88 	}
89 }
90 
91 #endif /* _CPPCANVAS_IMPLSPRITE_HXX */
92