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_XIeeeDoubleReadOnlyBitmap_idl__
24#define __com_sun_star_rendering_XIeeeDoubleReadOnlyBitmap_idl__
25
26#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
27#include <com/sun/star/lang/IllegalArgumentException.idl>
28#endif
29#ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__
30#include <com/sun/star/lang/IndexOutOfBoundsException.idl>
31#endif
32#ifndef __com_sun_star_rendering_FloatingPointBitmapLayout_idl__
33#include <com/sun/star/rendering/FloatingPointBitmapLayout.idl>
34#endif
35#ifndef __com_sun_star_geometry_IntegerPoint2D_idl__
36#include <com/sun/star/geometry/IntegerPoint2D.idl>
37#endif
38#ifndef __com_sun_star_geometry_IntegerRectangle2D_idl__
39#include <com/sun/star/geometry/IntegerRectangle2D.idl>
40#endif
41#ifndef __com_sun_star_rendering_XBitmap_idl__
42#include <com/sun/star/rendering/XBitmap.idl>
43#endif
44#ifndef __com_sun_star_rendering_VolatileContentDestroyedException_idl__
45#include <com/sun/star/rendering/VolatileContentDestroyedException.idl>
46#endif
47
48
49module com { module sun { module star { module rendering {
50
51/** This is a specialized interface for bitmaps containing IEEE
52    doubles for their color components. In contrast to
53    <type>XIeeeDoubleBitmap</type>, this interface only permits
54    read-only access.<p>
55
56    Use this interface for e.g. bitmaps that are calculated
57    on-the-fly, or that are pure functional, and thus cannot be
58    modified.<p>
59
60    If you get passed an instance of
61    <type>XHalfFloatReadOnlyBitmap</type> that also supports the
62    <type>XVolatileBitmap</type> interface, things become a bit more
63    complicated. When reading data, one has to check for both
64    <type>VolatileContentDestroyedException</type> and mismatching
65    <type>FloatingPointBitmapLayout</type> return values. If either of them
66    occurs, the whole bitmap read operation should be repeated.<p>
67 */
68interface XIeeeDoubleReadOnlyBitmap : XBitmap
69{
70	/** Query the raw data of this bitmap.<p>
71
72    	Query the raw data of this bitmap, in the format as defined by
73    	getMemoryLayout(). With the given rectangle, a subset of the
74    	whole bitmap can be queried. When querying subsets of the
75    	bitmap, the same scanline padding takes place as when the
76    	whole bitmap is requested.<p>
77
78        Note that the bitmap memory layout might change for volatile
79        bitmaps.<p>
80
81        @param bitmapLayout
82        The memory layout the returned data is in.
83
84        @param rect
85        A rectangle, within the bounds of the bitmap, to retrieve the
86        contens from.
87
88        @throws <type>VolatileContentDestroyedException</type>
89        if the bitmap is volatile, and the content has been destroyed by the system.
90
91        @throws <type>com::sun::star::lang::IndexOutOfBoundsException</type>
92        if parts of the given rectangle are outside the permissible
93        bitmap area.
94	 */
95	sequence<double>			getData( [out] FloatingPointBitmapLayout bitmapLayout, [in] ::com::sun::star::geometry::IntegerRectangle2D rect )
96        raises (com::sun::star::lang::IndexOutOfBoundsException,
97                VolatileContentDestroyedException);
98
99	//-------------------------------------------------------------------------
100
101	/** Get a single pixel of the bitmap, returning its color
102		value.<p>
103
104        Note that the bitmap memory layout might change for volatile
105        bitmaps.<p>
106
107        @param bitmapLayout
108        The memory layout the returned data is in.
109
110        @param pos
111        A position, within the bounds of the bitmap, to retrieve the
112        color from.
113
114        @throws <type>VolatileContentDestroyedException</type>
115        if the bitmap is volatile, and the content has been destroyed by the system.
116
117        @throws <type>com::sun::star::lang::IndexOutOfBoundsException</type>
118        if the given position is outside the permissible bitmap area.
119	 */
120	sequence<double>			getPixel( [out] FloatingPointBitmapLayout bitmapLayout, [in] ::com::sun::star::geometry::IntegerPoint2D pos )
121        raises (com::sun::star::lang::IndexOutOfBoundsException,
122                VolatileContentDestroyedException);
123
124	//-------------------------------------------------------------------------
125
126	/** Query the memory layout for this bitmap.<p>
127
128    	Please note that for volatile bitmaps, the memory layout might
129    	change between subsequent calls.<p>
130	 */
131	FloatingPointBitmapLayout	getMemoryLayout();
132};
133
134}; }; }; };
135
136#endif
137