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_XIeeeFloatBitmap_idl__
28#define __com_sun_star_rendering_XIeeeFloatBitmap_idl__
29
30#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
31#include <com/sun/star/lang/IllegalArgumentException.idl>
32#endif
33#ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__
34#include <com/sun/star/lang/IndexOutOfBoundsException.idl>
35#endif
36#ifndef __com_sun_star_rendering_FloatingPointBitmapLayout_idl__
37#include <com/sun/star/rendering/FloatingPointBitmapLayout.idl>
38#endif
39#ifndef __com_sun_star_geometry_IntegerPoint2D_idl__
40#include <com/sun/star/geometry/IntegerPoint2D.idl>
41#endif
42#ifndef __com_sun_star_geometry_IntegerRectangle2D_idl__
43#include <com/sun/star/geometry/IntegerRectangle2D.idl>
44#endif
45#ifndef __com_sun_star_rendering_XIeeeFloatReadOnlyBitmap_idl__
46#include <com/sun/star/rendering/XIeeeFloatReadOnlyBitmap.idl>
47#endif
48#ifndef __com_sun_star_rendering_VolatileContentDestroyedException_idl__
49#include <com/sun/star/rendering/VolatileContentDestroyedException.idl>
50#endif
51
52
53module com { module sun { module star { module rendering {
54
55/** Specialized interface for bitmaps containing IEEE floats as their
56    color components.<p>
57 */
58interface XIeeeFloatBitmap : XIeeeFloatReadOnlyBitmap
59{
60	//-------------------------------------------------------------------------
61
62	/** Set raw data of a bitmap.<p>
63
64    	Set raw data of a bitmap, in the format as defined by
65    	getMemoryLayout(). With the given rectangle, a subset of the
66    	bitmap can be changed. When setting subsets of the bitmap, the
67    	same scanline padding takes place as when the whole bitmap is
68    	changed.<p>
69
70        When setting data on volatile bitmaps, always call isValid()
71        before, and retrieve a new memory layout via
72        getMemoryLayout(). At least under Windows, the memory layout
73        can change for the same bitmap, if the user e.g. switches the
74        screen resolution. Thus, this method will throw an
75        IllegalArgumentException, if the memory layout changed between
76        a call to getMemoryLayout() and setData().<p>
77
78        @param data
79        Data to set
80
81        @param bitmapLayout
82        Layout of the data to set. Must match this bitmap's current
83        layout.
84
85        @param rect
86        Destination rectangle, within the bounds of the bitmap, to set
87        the data in.
88
89        @throws <type>com::sun::star::lang::IndexOutOfBoundsException</type>
90        if parts of the given rectangle are outside the permissible
91        bitmap area.
92
93        @throws <type>com::sun::star::lang::IllegalArgumentException</type>
94        if the given memory layout does not match this bitmap's
95        layout, or if the given data sequence has too few or too much
96        elements.
97	 */
98	void						setData( [in] sequence<float> data, [in] FloatingPointBitmapLayout bitmapLayout, [in] ::com::sun::star::geometry::IntegerRectangle2D rect )
99        raises (com::sun::star::lang::IllegalArgumentException,
100                com::sun::star::lang::IndexOutOfBoundsException);
101
102	//-------------------------------------------------------------------------
103
104	/** Set a single pixel of the bitmap with the given color
105		value.<p>
106
107        When setting data on volatile bitmaps, always call isValid()
108        before, and retrieve a new memory layout via
109        getMemoryLayout(). At least under Windows, the memory layout
110        can change for the same bitmap, if the user e.g. switches the
111        screen resolution. Thus, this method will throw an
112        IllegalArgumentException, if the memory layout changed between
113        a call to getMemoryLayout() and setPixel().<p>
114
115        @param color
116        The color value(s) to set
117
118        @param bitmapLayout
119        Layout of the color elements to set. Must match this bitmap's
120        current layout.
121
122        @param pos
123        Pixel position with the bounds of the bitmap to set.
124
125        @throws <type>com::sun::star::lang::IndexOutOfBoundsException</type>
126        if the given point is outside the permissible bitmap area.
127
128        @throws <type>com::sun::star::lang::IllegalArgumentException</type>
129        if the given memory layout does not match this bitmap's
130        layout, or if the given data sequence has too few or too much
131        elements.
132	 */
133	void						setPixel( [in] sequence<float> color, [in] FloatingPointBitmapLayout bitmapLayout, [in] ::com::sun::star::geometry::IntegerPoint2D pos )
134        raises (com::sun::star::lang::IllegalArgumentException,
135                com::sun::star::lang::IndexOutOfBoundsException);
136};
137
138}; }; }; };
139
140#endif
141