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 #ifndef com_sun_star_graphic_XGraphicRasterizer_idl
21 #define com_sun_star_graphic_XGraphicRasterizer_idl
23 #include
<com
/sun
/star
/io
/XInputStream.idl
>
24 #include
<com
/sun
/star
/graphic
/XGraphic.idl
>
25 #include
<com
/sun
/star
/beans
/PropertyValues.idl
>
26 #include
<com
/sun
/star
/beans
/XPropertySet.idl
>
27 #include
<com
/sun
/star
/awt
/Size.idl
>
29 module com
{ module sun
{ module star
{ module graphic
32 /** This interfaces exposes the initialize and a rasterize method to
33 rasterize a given data stream to a pixel graphic
35 interface XGraphicRasterizer
: ::com
::sun
::star
::uno
::XInterface
37 /** Initializing the rasterizer
39 <p>This method could also be used to determine, if
40 the provided data is able to be rasterized by the
41 implementation. The implementation should take care of
42 this feature as well as setting the default image size in
43 pixel within the given output parameter.</p>
46 The input stream of data that should be rasterized
49 The horizontal resolution of the callers device in pixel per inch. This
50 value is needed to calculate the correct dimensions of the graphic to be
51 rasterized. If a value of <value>0</value> is given, a horizontal default
52 resolution of 72 DPI is used.
55 The vertical resolution of the callers device in pixel per inch. This
56 value is needed to calculate the correct dimensions of the graphic to be
57 rasterized. If a value of <value>0</value> is given, a vertical default
58 resolution of 72 DPI is used.
60 @param DefaultSizePixel
61 The default rendering size in pixel of the underlying graphics
62 data may be available after the call via this output parameter.
64 In case no default size can be determined during initialization,
65 a default pixel size of 0,0 is returned. In this case, the caller
66 needs to assume a default pixel size, appropriate for the calling
70 A boolean value indicating if rasterizing of the given data is
71 possible at all and if the initialization process happened
74 @see com::sun::star::io::XInputStream
75 @see com::sun::star::awt::Size
77 boolean initializeData
( [in] com
::sun
::star
::io
::XInputStream DataStream
,
78 [in] unsigned long DPI_X
,
79 [in] unsigned long DPI_Y
,
80 [out] com
::sun
::star
::awt
::Size DefaultSizePixel
);
82 /** Rasterizing the initialized data into a XGraphic container.
84 <p>The XGraphic container will contain a pixel
85 type graphic after a successful rasterization process</p>
87 <p>In case of any fault during the rasterization process,
88 the XGraphic container will be empty afterwards and
89 the method will return false</p>
92 The width in pixel of the graphic to be rasterized.
93 This parameter is used without taking other transformation
97 The height in pixel of the graphic to be rasterized.
98 This parameter is used without taking other transformation
102 The rotation angle of the graphic to be rasterized.
103 This parameter is used without taking other transformation
104 values into account. The rotation is applied after scaling
105 and shearing the original image.
108 The horizontal shear angle of the graphic to be rasterized.
109 This parameter is used without taking other transformation
110 values into account. The shearing is applied after scaling
111 and before rotation of the image.
114 The vertical shear angle of the graphic to be rasterized.
115 This parameter is used without taking other transformation
116 values into account. The shearing is applied after scaling
117 and before rotation of the image.
119 @param RasterizeProperties
120 Additional properties for special needs (undefined by now)
122 @returns com::sun::star::graphic::XGraphic
123 An interface to a graphic container that holds the rasterized pixel data
125 @see com::sun::star::beans::PropertyValues
126 @see com::sun::star::graphic::XGraphic
128 com
::sun
::star
::graphic
::XGraphic rasterize
( [in] unsigned long Width
,
129 [in] unsigned long Height
,
130 [in] double RotateAngle
,
131 [in] double ShearAngle_X
,
132 [in] double ShearAngle_Y
,
133 [in] com
::sun
::star
::beans
::PropertyValues RasterizeProperties
);
140 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */