Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / offapi / com / sun / star / rendering / XIeeeDoubleReadOnlyBitmap.idl
blob6df739bcea3a36bb4964053c2b2b5efc3bc0eee5
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef __com_sun_star_rendering_XIeeeDoubleReadOnlyBitmap_idl__
20 #define __com_sun_star_rendering_XIeeeDoubleReadOnlyBitmap_idl__
22 #include <com/sun/star/lang/IllegalArgumentException.idl>
23 #include <com/sun/star/lang/IndexOutOfBoundsException.idl>
24 #include <com/sun/star/rendering/FloatingPointBitmapLayout.idl>
25 #include <com/sun/star/geometry/IntegerPoint2D.idl>
26 #include <com/sun/star/geometry/IntegerRectangle2D.idl>
27 #include <com/sun/star/rendering/XBitmap.idl>
28 #include <com/sun/star/rendering/VolatileContentDestroyedException.idl>
31 module com { module sun { module star { module rendering {
33 /** This is a specialized interface for bitmaps containing IEEE
34 doubles for their color components. In contrast to
35 XIeeeDoubleBitmap, this interface only permits
36 read-only access.<p>
38 Use this interface for e.g. bitmaps that are calculated
39 on-the-fly, or that are pure functional, and thus cannot be
40 modified.<p>
42 If you get passed an instance of
43 XHalfFloatReadOnlyBitmap that also supports the
44 XVolatileBitmap interface, things become a bit more
45 complicated. When reading data, one has to check for both
46 VolatileContentDestroyedException and mismatching
47 FloatingPointBitmapLayout return values. If either of them
48 occurs, the whole bitmap read operation should be repeated.<p>
50 interface XIeeeDoubleReadOnlyBitmap : XBitmap
52 /** Query the raw data of this bitmap.<p>
54 Query the raw data of this bitmap, in the format as defined by
55 getMemoryLayout(). With the given rectangle, a subset of the
56 whole bitmap can be queried. When querying subsets of the
57 bitmap, the same scanline padding takes place as when the
58 whole bitmap is requested.<p>
60 Note that the bitmap memory layout might change for volatile
61 bitmaps.<p>
63 @param bitmapLayout
64 The memory layout the returned data is in.
66 @param rect
67 A rectangle, within the bounds of the bitmap, to retrieve the
68 consent from.
70 @throws VolatileContentDestroyedException
71 if the bitmap is volatile, and the content has been destroyed by the system.
73 @throws com::sun::star::lang::IndexOutOfBoundsException
74 if parts of the given rectangle are outside the permissible
75 bitmap area.
77 sequence<double> getData( [out] FloatingPointBitmapLayout bitmapLayout, [in] ::com::sun::star::geometry::IntegerRectangle2D rect )
78 raises (com::sun::star::lang::IndexOutOfBoundsException,
79 VolatileContentDestroyedException);
82 /** Get a single pixel of the bitmap, returning its color
83 value.<p>
85 Note that the bitmap memory layout might change for volatile
86 bitmaps.<p>
88 @param bitmapLayout
89 The memory layout the returned data is in.
91 @param pos
92 A position, within the bounds of the bitmap, to retrieve the
93 color from.
95 @throws VolatileContentDestroyedException
96 if the bitmap is volatile, and the content has been destroyed by the system.
98 @throws com::sun::star::lang::IndexOutOfBoundsException
99 if the given position is outside the permissible bitmap area.
101 sequence<double> getPixel( [out] FloatingPointBitmapLayout bitmapLayout, [in] ::com::sun::star::geometry::IntegerPoint2D pos )
102 raises (com::sun::star::lang::IndexOutOfBoundsException,
103 VolatileContentDestroyedException);
106 /** Query the memory layout for this bitmap.<p>
108 Please note that for volatile bitmaps, the memory layout might
109 change between subsequent calls.<p>
111 FloatingPointBitmapLayout getMemoryLayout();
114 }; }; }; };
116 #endif
118 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */