1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*/*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #ifndef com_sun_star_graphic_XGraphicRasterizer_idl
30 #define com_sun_star_graphic_XGraphicRasterizer_idl
32 #include
<com
/sun
/star
/io
/XInputStream.idl
>
33 #include
<com
/sun
/star
/graphic
/XGraphic.idl
>
34 #include
<com
/sun
/star
/beans
/PropertyValues.idl
>
35 #include
<com
/sun
/star
/beans
/XPropertySet.idl
>
36 #include
<com
/sun
/star
/awt
/Size.idl
>
38 module com
{ module sun
{ module star
{ module graphic
41 /** This interfaces exposes the initialize and a rasterize method to
42 rasterize a given data stream to a pixel graphic
44 interface XGraphicRasterizer
: ::com
::sun
::star
::uno
::XInterface
46 /** Initializing the rasterizer
48 <p>This method could also be used to determine, if
49 the provided data is able to be rasterized by the
50 implementation. The implementation should take care of
51 this feature as well as setting the default image size in
52 pixel within the given output parameter.</p>
55 The input stream of data that should be rasterized
58 The horizontal resolution of the callers device in pixel per inch. This
59 value is needed to calculate the correct dimensions of the graphic to be
60 rasterized. If a value of <value>0</value> is given, a horizontal default
61 resolution of 72 DPI is used.
64 The vertical resolution of the callers device in pixel per inch. This
65 value is needed to calculate the correct dimensions of the graphic to be
66 rasterized. If a value of <value>0</value> is given, a vertical default
67 resolution of 72 DPI is used.
69 @param DefaultSizePixel
70 The default rendering size in pixel of the underlying graphics
71 data may be available after the call via this output parameter.
73 In case no default size can be determined during initialization,
74 a default pixel size of 0,0 is returned. In this case, the caller
75 needs to assume a default pixel size, appropriate for the calling
79 A boolean value indicating if rasterizing of the given data is
80 possible at all and if the initialization process happened
83 @see com::sun::star::io::XInputStream
84 @see com::sun::star::awt::Size
86 boolean initializeData
( [in] com
::sun
::star
::io
::XInputStream DataStream
,
87 [in] unsigned long DPI_X
,
88 [in] unsigned long DPI_Y
,
89 [out] com
::sun
::star
::awt
::Size DefaultSizePixel
);
91 /** Rasterizing the initialized data into a <type>XGraphic</type> container.
93 <p>The <type>XGraphic</type> container will contain a pixel
94 type graphic after a successful rasterization process</p>
96 <p>In case of any fault during the rasterization process,
97 the <type>XGraphic</type> container will be empty afterwards and
98 the method will return false</p>
101 The width in pixel of the graphic to be rasterized.
102 This parameter is used without taking other transformation
106 The height in pixel of the graphic to be rasterized.
107 This parameter is used without taking other transformation
111 The rotation angle of the graphic to be rasterized.
112 This parameter is used without taking other transformation
113 values into account. The rotation is applied after scaling
114 and shearing the original image.
117 The horizontal shear angle of the graphic to be rasterized.
118 This parameter is used without taking other transformation
119 values into account. The shearing is applied after scaling
120 and before rotation of the image.
123 The vertical shear angle of the graphic to be rasterized.
124 This parameter is used without taking other transformation
125 values into account. The shearing is applied after scaling
126 and before rotation of the image.
128 @param RasterizeProperties
129 Additional properties for special needs (undefined by now)
132 An interface to a graphic container into which the given data
133 should be rasterized.
135 @returns com::sun::star::graphic::XGraphic
136 An interface to a graphic container that holds the rasterized pixel data
138 @see com::sun::star::beans::PropertyValues
139 @see com::sun::star::graphic::XGraphic
141 com
::sun
::star
::graphic
::XGraphic rasterize
( [in] unsigned long Width
,
142 [in] unsigned long Height
,
143 [in] double RotateAngle
,
144 [in] double ShearAngle_X
,
145 [in] double ShearAngle_Y
,
146 [in] com
::sun
::star
::beans
::PropertyValues RasterizeProperties
);
153 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */