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