update dev300-m58
[ooovba.git] / cppcanvas / source / wrapper / implbitmap.hxx
blob0a4d6c2584359f469e5312460bc2e9e1db90232b
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: implbitmap.hxx,v $
10 * $Revision: 1.6 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _CPPCANVAS_IMPLBITMAP_HXX
32 #define _CPPCANVAS_IMPLBITMAP_HXX
34 #include <com/sun/star/uno/Reference.hxx>
35 #ifndef _COM_SUN_STAR_RENDERING_XBITMAP_HPP__
36 #include <com/sun/star/rendering/XBitmap.hpp>
37 #endif
38 #ifndef _COM_SUN_STAR_RENDERING_XGRAPHICDEVICE_HPP__
39 #include <com/sun/star/rendering/XGraphicDevice.hpp>
40 #endif
42 #include <cppcanvas/bitmap.hxx>
43 #include <canvasgraphichelper.hxx>
46 /*Definition of ImplBitmap */
48 namespace cppcanvas
51 namespace internal
53 // share partial CanvasGraphic implementation from CanvasGraphicHelper
54 class ImplBitmap : public virtual ::cppcanvas::Bitmap, protected CanvasGraphicHelper
56 public:
58 ImplBitmap( const CanvasSharedPtr& rParentCanvas,
59 const ::com::sun::star::uno::Reference<
60 ::com::sun::star::rendering::XBitmap >& rBitmap );
62 virtual ~ImplBitmap();
64 // CanvasGraphic implementation (that was not already implemented by CanvasGraphicHelper)
65 virtual bool draw() const;
66 virtual bool drawAlphaModulated( double nAlphaModulation ) const;
68 virtual BitmapCanvasSharedPtr getBitmapCanvas() const;
70 // Bitmap implementation
71 virtual ::com::sun::star::uno::Reference<
72 ::com::sun::star::rendering::XBitmap > getUNOBitmap() const;
74 private:
75 // default: disabled copy/assignment
76 ImplBitmap(const ImplBitmap&);
77 ImplBitmap& operator=( const ImplBitmap& );
79 const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmap > mxBitmap;
80 BitmapCanvasSharedPtr mpBitmapCanvas;
85 #endif /* _CPPCANVAS_IMPLBITMAP_HXX */