merge the formfield patch from ooo-build
[ooovba.git] / offapi / com / sun / star / rendering / XBitmapPalette.idl
blobfb4d88c9adc7b35906b4c86dbfea78f8ca3e7308
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XBitmapPalette.idl,v $
10 * $Revision: 1.9 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef __com_sun_star_rendering_XBitmapPalette_idl__
31 #define __com_sun_star_rendering_XBitmapPalette_idl__
33 #ifndef __com_sun_star_uno_XInterface_idl__
34 #include <com/sun/star/uno/XInterface.idl>
35 #endif
36 #ifndef __com_sun_star_lang_IllegalArgumentException_idl__
37 #include <com/sun/star/lang/IllegalArgumentException.idl>
38 #endif
39 #ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__
40 #include <com/sun/star/lang/IndexOutOfBoundsException.idl>
41 #endif
42 #ifndef __com_sun_star_rendering_XColorSpace_idl__
43 #include <com/sun/star/rendering/XColorSpace.idl>
44 #endif
47 module com { module sun { module star { module rendering {
49 /** Interface to access the palette of a color-indexed bitmap.
51 @since OOo 2.0.0
53 interface XBitmapPalette : ::com::sun::star::uno::XInterface
55 /** Request the number of palette entries available.
57 @return the number of entries in this palette.
59 long getNumberOfEntries();
61 //-------------------------------------------------------------------------
63 /** Request the color for the given palette entry.
65 @param entry
66 Output parameter for the color components at the given palette
67 entry.
69 @param nIndex
70 The index of the palette entry to be retrieved. Valid range is
71 [0,getNumberOfEntries()-1].
73 @return <TRUE/>, if the given palette entry should be displayed
74 opaque, and <FALSE/> if the entry should be displayed
75 transparent. This is sometimes used for so-called mask
76 transparency, by flagging certain palette entries to be fully
77 transparent when displaying the bitmap.
79 @throws <type>com::sun::star::lang::IndexOutOfBoundsException</type>
80 if the index is smaller than zero or larger than
81 <member>XBitmapPalette::getNumberOfEntries()</member>-1.
83 boolean getIndex( [out] sequence<ColorComponent> entry, [in] long nIndex )
84 raises (com::sun::star::lang::IndexOutOfBoundsException);
86 //-------------------------------------------------------------------------
88 /** Set the color for the given palette entry.
90 @param color
91 Sequence of device color values in the associated bitmap's
92 device color format.
94 @param transparency
95 When <TRUE/>, the specified palette entry is displayed as
96 opaque color. When <FALSE/>, the given entry displays as fully
97 transparent during output.
99 @param nIndex
100 The index of the palette entry to be changed. Valid range is
101 [0,getNumberOfEntries()-1].
103 @return whether the palette entry was changed. For read-only
104 entries, this method always returns <FALSE/>.
106 @throws <type>com::sun::star::lang::IndexOutOfBoundsException</type>
107 if the index is smaller than zero or larger than
108 <member>XBitmapPalette::getNumberOfEntries()</member>-1.
110 @throws <type>com::sun::star::lang::IllegalArgumentException</type>
111 if the given sequence of color components does not match the
112 associated bitmap's device color format.
114 boolean setIndex( [in] sequence<ColorComponent> color, [in] boolean transparency, [in] long nIndex )
115 raises (com::sun::star::lang::IndexOutOfBoundsException,
116 com::sun::star::lang::IllegalArgumentException);
118 //-------------------------------------------------------------------------
120 /** Query associated color space.<p>
122 @return the color space that is associated with this palette.
124 XColorSpace getColorSpace( );
127 }; }; }; };
129 #endif