Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15

API

SDK

Tips ‘n’ Tricks

Miscellaneous


:: com :: sun :: star :: rendering ::

interface XBitmap
Description
This is a generic interface to a bitmap.

This interface contains the generic functionality to be used on every XCanvas bitmap object. More format-specific methods can be found at the XIntegerBitmap, XIeeeDoubleBitmap, XIeeeFloatBitmap and XHalfFloatBitmap interfaces.

Since
OOo 2.0

Methods' Summary
getSize Query the size of the bitmap. 
hasAlpha Query transparency status of the bitmap. 
getScaledBitmap Query a scaled copy of the original bitmap.  
Methods' Details
getSize
::com::sun::star::geometry::IntegerSize2D
getSize();

Description
Query the size of the bitmap.

This method queries the bitmap size in pixel.

Returns
the bitmap size in pixel.
hasAlpha
boolean
hasAlpha();

Description
Query transparency status of the bitmap.

The method checks, whether the bitmap contains any alpha information. The same information is also available at the XColorSpace associated with this bitmap, though much easier to access here (the color space then has a component flagged ColorComponentTag::ALPHA).

Returns
true, if the bitmap has alpha data, or false if not.
getScaledBitmap
XBitmap
getScaledBitmap( [in] ::com::sun::star::geometry::RealSize2D  newSize,
[in] boolean  beFast )
raises( ::com::sun::star::lang::IllegalArgumentException,
VolatileContentDestroyedException );

Description
Query a scaled copy of the original bitmap.
Parameter newSize
Requested size of the new bitmap. Both of the two size components must be greater than zero.
Parameter beFast
When set to true, this parameter advises getScaledBitmap to use the fastest available algorithm to scale the bitmap, which might cause visible artifacts.
Returns
the new scaled bitmap.
Throws
com::sun::star::lang::IllegalArgumentException if the size components are outside the specified range.
Throws
VolatileContentDestroyedException if the contents of a volatile bitmap have been destroyed, and thus cannot be read to generate the scaled bitmap.
Top of Page

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.