LibreOffice LibreOffice 25.8 SDK API Reference

Public Member Functions | List of all members
XGraphicRasterizer Interface Reference

This interfaces exposes the initialize and a rasterize method to rasterize a given data stream to a pixel graphic. More...

`import"XGraphicRasterizer.idl";`

Inheritance diagram for XGraphicRasterizer:

## Public Member Functions
boolean | initializeData ([in] com::sun::star::io::XInputStream DataStream, [in] unsigned long DPI_X, [in] unsigned long DPI_Y, [out] com::sun::star::awt::Size DefaultSizePixel)
| Initializing the rasterizer. More...
com::sun::star::graphic::XGraphic | rasterize ([in] unsigned long Width, [in] unsigned long Height, [in] double RotateAngle, [in] double ShearAngle_X, [in] double ShearAngle_Y, [in] com::sun::star::beans::PropertyValues RasterizeProperties)
| Rasterizing the initialized data into a XGraphic container. 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

This interfaces exposes the initialize and a rasterize method to rasterize a given data stream to a pixel graphic.

## Member Function Documentation

## ◆ initializeData()

boolean initializeData | ( | [in] com::sun::star::io::XInputStream | DataStream,
|  | [in] unsigned long | DPI_X,
|  | [in] unsigned long | DPI_Y,
|  | [out] com::sun::star::awt::Size | DefaultSizePixel
| ) |  |

Initializing the rasterizer.

This method could also be used to determine, if the provided data is able to be rasterized by the implementation. The implementation should take care of this feature as well as setting the default image size in pixel within the given output parameter.

Parameters

  DataStream | The input stream of data that should be rasterized
  DPI_X | The horizontal resolution of the callers device in pixel per inch. This value is needed to calculate the correct dimensions of the graphic to be rasterized. If a value of

0

is given, a horizontal default resolution of 72 DPI is used.

Parameters

  DPI_Y | The vertical resolution of the callers device in pixel per inch. This value is needed to calculate the correct dimensions of the graphic to be rasterized. If a value of

0

is given, a vertical default resolution of 72 DPI is used.

Parameters

  DefaultSizePixel | The default rendering size in pixel of the underlying graphics data may be available after the call via this output parameter.

In case no default size can be determined during initialization, a default pixel size of 0,0 is returned. In this case, the caller needs to assume a default pixel size, appropriate for the calling context.

Returns
  A boolean value indicating if rasterizing of the given data is possible at all and if the initialization process happened successfully.

See also
  com::sun::star::io::XInputStream
  com::sun::star::awt::Size

## ◆ rasterize()

com::sun::star::graphic::XGraphic rasterize | ( | [in] unsigned long | Width,
|  | [in] unsigned long | Height,
|  | [in] double | RotateAngle,
|  | [in] double | ShearAngle_X,
|  | [in] double | ShearAngle_Y,
|  | [in] com::sun::star::beans::PropertyValues | RasterizeProperties
| ) |  |

Rasterizing the initialized data into a XGraphic container.

The XGraphic container will contain a pixel type graphic after a successful rasterization process

In case of any fault during the rasterization process, the XGraphic container will be empty afterwards and the method will return false

Parameters

  Width | The width in pixel of the graphic to be rasterized. This parameter is used without taking other transformation values into account.
  Height | The height in pixel of the graphic to be rasterized. This parameter is used without taking other transformation values into account.
  RotateAngle | The rotation angle of the graphic to be rasterized. This parameter is used without taking other transformation values into account. The rotation is applied after scaling and shearing the original image.
  ShearAngle_X | The horizontal shear angle of the graphic to be rasterized. This parameter is used without taking other transformation values into account. The shearing is applied after scaling and before rotation of the image.
  ShearAngle_Y | The vertical shear angle of the graphic to be rasterized. This parameter is used without taking other transformation values into account. The shearing is applied after scaling and before rotation of the image.
  RasterizeProperties | Additional properties for special needs (undefined by now)

Returns
  com::sun::star::graphic::XGraphic An interface to a graphic container that holds the rasterized pixel data

See also
  com::sun::star::beans::PropertyValues
  com::sun::star::graphic::XGraphic

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

- com/sun/star/graphic/XGraphicRasterizer.idl