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#ifndef __com_sun_star_rendering_XBitmap_idl__
28#define __com_sun_star_rendering_XBitmap_idl__
29
30#ifndef __com_sun_star_uno_XInterface_idl__
31#include <com/sun/star/uno/XInterface.idl>
32#endif
33#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
34#include <com/sun/star/lang/IllegalArgumentException.idl>
35#endif
36#ifndef __com_sun_star_geometry_IntegerSize2D_idl__
37#include <com/sun/star/geometry/IntegerSize2D.idl>
38#endif
39#ifndef __com_sun_star_geometry_RealSize2D_idl__
40#include <com/sun/star/geometry/RealSize2D.idl>
41#endif
42#ifndef __com_sun_star_rendering_VolatileContentDestroyedException_idl__
43#include <com/sun/star/rendering/VolatileContentDestroyedException.idl>
44#endif
45
46module com { module sun { module star { module rendering {
47
48/** This is a generic interface to a bitmap.<p>
49
50    This interface contains the generic functionality to be used on
51    every <type>XCanvas</type> bitmap object. More format-specific
52    methods can be found at the <type>XIntegerBitmap</type>,
53    <type>XIeeeDoubleBitmap</type>, <type>XIeeeFloatBitmap</type> and
54    <type>XHalfFloatBitmap</type> interfaces.<p>
55
56    @since OOo 2.0
57 */
58published interface XBitmap : ::com::sun::star::uno::XInterface
59{
60    /** Query the size of the bitmap.<p>
61
62        This method queries the bitmap size in pixel.<p>
63
64        @return the bitmap size in pixel.
65     */
66    ::com::sun::star::geometry::IntegerSize2D	getSize();
67
68    //-------------------------------------------------------------------------
69
70    /** Query transparency status of the bitmap.<p>
71
72        The method checks, whether the bitmap contains any alpha
73        information. The same information is also available at the
74        <type>XColorSpace</type> associated with this bitmap, though
75        much easier to access here (the color space then has a
76        component flagged
77        <member>ColorComponentTag::ALPHA</member>).<p>
78
79        @return <TRUE/>, if the bitmap has alpha data, or <FALSE/> if
80        not.
81     */
82    boolean										hasAlpha();
83
84    //-------------------------------------------------------------------------
85
86    /** Query a scaled copy of the original bitmap.
87
88        @param newSize
89        Requested size of the new bitmap. Both of the two size
90        components must be greater than zero.
91
92        @param beFast
93        When set to true, this parameter advises getScaledBitmap to
94        use the fastest available algorithm to scale the bitmap, which
95        might cause visible artifacts.
96
97        @returns the new scaled bitmap.
98
99        @throws <type>com::sun::star::lang::IllegalArgumentException</type>
100        if the size components are outside the specified range.
101
102        @throws <type>VolatileContentDestroyedException</type>
103        if the contents of a volatile bitmap have been destroyed, and
104        thus cannot be read to generate the scaled bitmap.
105     */
106    XBitmap							getScaledBitmap( [in] ::com::sun::star::geometry::RealSize2D newSize, [in] boolean beFast )
107        raises (com::sun::star::lang::IllegalArgumentException,
108                VolatileContentDestroyedException);
109};
110
111}; }; }; };
112
113#endif
114