1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 module com
{ module sun
{ module star
{ module graphic
23 /** This interfaces exposes the initialize and a rasterize method to
24 rasterize a given data stream to a pixel graphic
26 interface XGraphicRasterizer
: ::com
::sun
::star
::uno
::XInterface
28 /** Initializing the rasterizer
30 <p>This method could also be used to determine, if
31 the provided data is able to be rasterized by the
32 implementation. The implementation should take care of
33 this feature as well as setting the default image size in
34 pixel within the given output parameter.</p>
37 The input stream of data that should be rasterized
40 The horizontal resolution of the callers device in pixel per inch. This
41 value is needed to calculate the correct dimensions of the graphic to be
42 rasterized. If a value of <value>0</value> is given, a horizontal default
43 resolution of 72 DPI is used.
46 The vertical resolution of the callers device in pixel per inch. This
47 value is needed to calculate the correct dimensions of the graphic to be
48 rasterized. If a value of <value>0</value> is given, a vertical default
49 resolution of 72 DPI is used.
51 @param DefaultSizePixel
52 The default rendering size in pixel of the underlying graphics
53 data may be available after the call via this output parameter.
55 In case no default size can be determined during initialization,
56 a default pixel size of 0,0 is returned. In this case, the caller
57 needs to assume a default pixel size, appropriate for the calling
61 A boolean value indicating if rasterizing of the given data is
62 possible at all and if the initialization process happened
65 @see com::sun::star::io::XInputStream
66 @see com::sun::star::awt::Size
68 boolean initializeData
( [in] com
::sun
::star
::io
::XInputStream DataStream
,
69 [in] unsigned long DPI_X
,
70 [in] unsigned long DPI_Y
,
71 [out] com
::sun
::star
::awt
::Size DefaultSizePixel
);
73 /** Rasterizing the initialized data into a XGraphic container.
75 <p>The XGraphic container will contain a pixel
76 type graphic after a successful rasterization process</p>
78 <p>In case of any fault during the rasterization process,
79 the XGraphic container will be empty afterwards and
80 the method will return false</p>
83 The width in pixel of the graphic to be rasterized.
84 This parameter is used without taking other transformation
88 The height in pixel of the graphic to be rasterized.
89 This parameter is used without taking other transformation
93 The rotation angle of the graphic to be rasterized.
94 This parameter is used without taking other transformation
95 values into account. The rotation is applied after scaling
96 and shearing the original image.
99 The horizontal shear angle of the graphic to be rasterized.
100 This parameter is used without taking other transformation
101 values into account. The shearing is applied after scaling
102 and before rotation of the image.
105 The vertical shear angle of the graphic to be rasterized.
106 This parameter is used without taking other transformation
107 values into account. The shearing is applied after scaling
108 and before rotation of the image.
110 @param RasterizeProperties
111 Additional properties for special needs (undefined by now)
113 @returns com::sun::star::graphic::XGraphic
114 An interface to a graphic container that holds the rasterized pixel data
116 @see com::sun::star::beans::PropertyValues
117 @see com::sun::star::graphic::XGraphic
119 com
::sun
::star
::graphic
::XGraphic rasterize
( [in] unsigned long Width
,
120 [in] unsigned long Height
,
121 [in] double RotateAngle
,
122 [in] double ShearAngle_X
,
123 [in] double ShearAngle_Y
,
124 [in] com
::sun
::star
::beans
::PropertyValues RasterizeProperties
);
129 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */