1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef com_sun_star_graphic_XGraphicRasterizer_idl
#define com_sun_star_graphic_XGraphicRasterizer_idl
#include <com/sun/star/io/XInputStream.idl>
#include <com/sun/star/graphic/XGraphic.idl>
#include <com/sun/star/beans/PropertyValues.idl>
#include <com/sun/star/beans/XPropertySet.idl>
#include <com/sun/star/awt/Size.idl>
module com { module sun { module star { module graphic
{
/** This interfaces exposes the initialize and a rasterize method to
rasterize a given data stream to a pixel graphic
*/
interface XGraphicRasterizer : ::com::sun::star::uno::XInterface
{
/** Initializing the rasterizer
<p>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.</p>
@param DataStream
The input stream of data that should be rasterized
@param 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 <value>0</value> is given, a horizontal default
resolution of 72 DPI is used.
@param 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 <value>0</value> is given, a vertical default
resolution of 72 DPI is used.
@param 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 com::sun::star::io::XInputStream
@see com::sun::star::awt::Size
*/
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 );
/** Rasterizing the initialized data into a XGraphic container.
<p>The XGraphic container will contain a pixel
type graphic after a successful rasterization process</p>
<p>In case of any fault during the rasterization process,
the XGraphic container will be empty afterwards and
the method will return false</p>
@param Width
The width in pixel of the graphic to be rasterized.
This parameter is used without taking other transformation
values into account.
@param Height
The height in pixel of the graphic to be rasterized.
This parameter is used without taking other transformation
values into account.
@param 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.
@param 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.
@param 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.
@param 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 com::sun::star::beans::PropertyValues
@see com::sun::star::graphic::XGraphic
*/
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 );
};
} ; } ; } ; } ;
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|