LibreOffice
LibreOffice 24.2 SDK API Reference
Public Member Functions | List of all members
XBitmapPalette Interface Reference

Interface to access the palette of a color-indexed bitmap. More...

import"XBitmapPalette.idl";

Inheritance diagram for XBitmapPalette:
XInterface

Public Member Functions

long getNumberOfEntries ()
 Request the number of palette entries available. More...
 
boolean getIndex ([out] sequence< ColorComponent > entry, [in] long nIndex) raises (com::sun::star::lang::IndexOutOfBoundsException)
 Request the color for the given palette entry. More...
 
boolean setIndex ([in] sequence< ColorComponent > color, [in] boolean transparency, [in] long nIndex) raises (com::sun::star::lang::IndexOutOfBoundsException, com::sun::star::lang::IllegalArgumentException)
 Set the color for the given palette entry. More...
 
XColorSpace getColorSpace ()
 Query associated color space. More...
 
- Public Member Functions inherited from XInterface
any queryInterface ([in] type aType)
 queries for a new interface to an existing UNO object. More...
 
void acquire ()
 increases the reference counter by one. More...
 
void release ()
 decreases the reference counter by one. More...
 

Detailed Description

Interface to access the palette of a color-indexed bitmap.

Since
OOo 2.0

Member Function Documentation

◆ getColorSpace()

XColorSpace getColorSpace ( )

Query associated color space.

Returns
the color space that is associated with this palette.

◆ getIndex()

boolean getIndex ( [out] sequence< ColorComponent entry,
[in] long  nIndex 
)
raises (com::sun::star::lang::IndexOutOfBoundsException
)

Request the color for the given palette entry.

Parameters
entryOutput parameter for the color components at the given palette entry.
nIndexThe index of the palette entry to be retrieved. Valid range is [0,getNumberOfEntries()-1].
Returns
TRUE, if the given palette entry should be displayed opaque, and FALSE if the entry should be displayed transparent. This is sometimes used for so-called mask transparency, by flagging certain palette entries to be fully transparent when displaying the bitmap.
Exceptions
com::sun::star::lang::IndexOutOfBoundsExceptionif the index is smaller than zero or larger than XBitmapPalette::getNumberOfEntries()-1.

◆ getNumberOfEntries()

long getNumberOfEntries ( )

Request the number of palette entries available.

Returns
the number of entries in this palette.

◆ setIndex()

boolean setIndex ( [in] sequence< ColorComponent color,
[in] boolean  transparency,
[in] long  nIndex 
)
raises (com::sun::star::lang::IndexOutOfBoundsException,
com::sun::star::lang::IllegalArgumentException
)

Set the color for the given palette entry.

Parameters
colorSequence of device color values in the associated bitmap's device color format.
transparencyWhen TRUE, the specified palette entry is displayed as opaque color. When FALSE, the given entry displays as fully transparent during output.
nIndexThe index of the palette entry to be changed. Valid range is [0,getNumberOfEntries()-1].
Returns
whether the palette entry was changed. For read-only entries, this method always returns FALSE.
Exceptions
com::sun::star::lang::IndexOutOfBoundsExceptionif the index is smaller than zero or larger than XBitmapPalette::getNumberOfEntries()-1.
com::sun::star::lang::IllegalArgumentExceptionif the given sequence of color components does not match the associated bitmap's device color format.

The documentation for this interface was generated from the following file: