update dev300-m58
[ooovba.git] / canvas / source / directx / dx_ibitmap.hxx
blobb972ed94963fc08d12dcc97b303475cd01301249
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: dx_ibitmap.hxx,v $
10 * $Revision: 1.2 $
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 _DXCANVAS_DXIBITMAP_HXX
32 #define _DXCANVAS_DXIBITMAP_HXX
34 #include <com/sun/star/rendering/XCanvas.hpp>
35 #include <com/sun/star/rendering/XIntegerBitmap.hpp>
36 #include <boost/shared_ptr.hpp>
37 #include <basegfx/vector/b2ivector.hxx>
38 #include <basegfx/point/b2dpoint.hxx>
39 #include <basegfx/range/b2drange.hxx>
40 #include "dx_graphicsprovider.hxx"
42 namespace dxcanvas
44 /// Interface for internal canvas bitmap objects
45 struct IBitmap : public GraphicsProvider
47 virtual BitmapSharedPtr getBitmap() const = 0;
48 virtual ::basegfx::B2IVector getSize() const = 0;
49 virtual bool hasAlpha() const = 0;
51 virtual ::com::sun::star::uno::Sequence< sal_Int8 > getData(
52 ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
53 const ::com::sun::star::geometry::IntegerRectangle2D& rect ) = 0;
55 virtual void setData(
56 const ::com::sun::star::uno::Sequence< sal_Int8 >& data,
57 const ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
58 const ::com::sun::star::geometry::IntegerRectangle2D& rect ) = 0;
60 virtual void setPixel(
61 const ::com::sun::star::uno::Sequence< sal_Int8 >& color,
62 const ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
63 const ::com::sun::star::geometry::IntegerPoint2D& pos ) = 0;
65 virtual ::com::sun::star::uno::Sequence< sal_Int8 > getPixel(
66 ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
67 const ::com::sun::star::geometry::IntegerPoint2D& pos ) = 0;
70 typedef boost::shared_ptr<IBitmap> IBitmapSharedPtr;
73 #endif