xref: /AOO41X/main/offapi/com/sun/star/awt/XGraphics.idl (revision 54628ca40d27d15cc98fe861da7fff7e60c2f7d6)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23#ifndef __com_sun_star_awt_XGraphics_idl__
24#define __com_sun_star_awt_XGraphics_idl__
25
26#ifndef __com_sun_star_uno_XInterface_idl__
27#include <com/sun/star/uno/XInterface.idl>
28#endif
29
30#ifndef __com_sun_star_util_Color_idl__
31#include <com/sun/star/util/Color.idl>
32#endif
33
34#ifndef __com_sun_star_awt_SimpleFontMetric_idl__
35#include <com/sun/star/awt/SimpleFontMetric.idl>
36#endif
37
38#ifndef __com_sun_star_awt_FontDescriptor_idl__
39#include <com/sun/star/awt/FontDescriptor.idl>
40#endif
41
42#ifndef __com_sun_star_awt_RasterOperation_idl__
43#include <com/sun/star/awt/RasterOperation.idl>
44#endif
45
46#ifndef __com_sun_star_awt_Gradient_idl__
47#include <com/sun/star/awt/Gradient.idl>
48#endif
49
50//=============================================================================
51
52 module com {  module sun {  module star {  module awt {
53
54 published interface XRegion;
55 published interface XDisplayBitmap;
56 published interface XFont;
57 published interface XDevice;
58
59//=============================================================================
60
61/** provides the basic output operation of a device.
62 */
63published interface XGraphics: com::sun::star::uno::XInterface
64{
65    //-------------------------------------------------------------------------
66
67    /** returns the device of this graphics.
68     */
69    XDevice getDevice();
70
71    //-------------------------------------------------------------------------
72
73    /** returns the font metric of the current font.
74     */
75    SimpleFontMetric getFontMetric();
76
77    //-------------------------------------------------------------------------
78
79    /** sets the font used by text operations.
80     */
81    [oneway] void setFont( [in] XFont xNewFont );
82
83    //-------------------------------------------------------------------------
84
85    /** creates a new font and sets the font.
86     */
87    [oneway] void selectFont( [in] FontDescriptor aDescription );
88
89    //-------------------------------------------------------------------------
90
91    /** sets the text color used by text operations.
92     */
93    [oneway] void setTextColor( [in] com::sun::star::util::Color nColor );
94
95    //-------------------------------------------------------------------------
96
97    /** sets the fill color used by text operations.
98     */
99    [oneway] void setTextFillColor( [in] com::sun::star::util::Color nColor );
100
101    //-------------------------------------------------------------------------
102
103    /** sets the line color.
104     */
105    [oneway] void setLineColor( [in] com::sun::star::util::Color nColor );
106
107    //-------------------------------------------------------------------------
108
109    /** sets the fill color.
110     */
111    [oneway] void setFillColor( [in] com::sun::star::util::Color nColor );
112
113    //-------------------------------------------------------------------------
114
115    /** sets the raster operation.
116
117        <p>If the device does not support raster operations
118        then this call is ignored.</p>
119     */
120    [oneway] void setRasterOp( [in] RasterOperation ROP );
121
122    //-------------------------------------------------------------------------
123
124    /** sets the clip region to specified clipping.
125     */
126    [oneway] void setClipRegion( [in] XRegion Clipping );
127
128    //-------------------------------------------------------------------------
129
130    /** builds the intersection with the current region.
131     */
132    [oneway] void intersectClipRegion( [in] XRegion xClipping );
133
134    //-------------------------------------------------------------------------
135
136    /** saves all current settings (Font, TextColor, TextFillColor,
137        LineColor, FillColor, RasterOp, ClipRegion).
138     */
139    [oneway] void push();
140
141    //-------------------------------------------------------------------------
142
143    /** restores all previous saved settings.
144     */
145    [oneway] void pop();
146
147    //-------------------------------------------------------------------------
148
149    /** copies a rectangle of pixels from another device into this one.
150     */
151    [oneway] void copy( [in] XDevice xSource,
152             [in] long nSourceX,
153             [in] long nSourceY,
154             [in] long nSourceWidth,
155             [in] long nSourceHeight,
156             [in] long nDestX,
157             [in] long nDestY,
158             [in] long nDestWidth,
159             [in] long nDestHeight );
160
161    //-------------------------------------------------------------------------
162
163    /** draws a part of the specified bitmap to the output device.
164     */
165    [oneway] void draw( [in] XDisplayBitmap xBitmapHandle,
166             [in] long SourceX,
167             [in] long SourceY,
168             [in] long SourceWidth,
169             [in] long SourceHeight,
170             [in] long DestX,
171             [in] long DestY,
172             [in] long DestWidth,
173             [in] long DestHeight );
174
175    //-------------------------------------------------------------------------
176
177    /** sets a single pixel in the output device.
178     */
179    [oneway] void drawPixel( [in] long X,
180             [in] long Y );
181
182    //-------------------------------------------------------------------------
183
184    /** draws a line in the output device.
185     */
186    [oneway] void drawLine( [in] long X1,
187             [in] long Y1,
188             [in] long X2,
189             [in] long Y2 );
190
191    //-------------------------------------------------------------------------
192
193    /** draws a rectangle in the output device.
194     */
195    [oneway] void drawRect( [in] long X,
196             [in] long Y,
197             [in] long Width,
198             [in] long Height );
199
200    //-------------------------------------------------------------------------
201
202    /** draws a rectangle with rounded corners in the output device.
203     */
204    [oneway] void drawRoundedRect( [in] long X,
205             [in] long Y,
206             [in] long Width,
207             [in] long Height,
208             [in] long nHorzRound,
209             [in] long nVertRound );
210
211    //-------------------------------------------------------------------------
212
213    /** draws multiple lines in the output device at once.
214     */
215    [oneway] void drawPolyLine( [in] sequence<long> DataX,
216             [in] sequence<long> DataY );
217
218    //-------------------------------------------------------------------------
219
220    /** draws a polygon line in the output device.
221     */
222    [oneway] void drawPolygon( [in] sequence<long> DataX,
223             [in] sequence<long> DataY );
224
225    //-------------------------------------------------------------------------
226
227    /** draws multiple polygons in the output device at once.
228     */
229    [oneway] void drawPolyPolygon( [in] sequence< sequence<long> > DataX,
230             [in] sequence< sequence<long> > DataY );
231
232    //-------------------------------------------------------------------------
233
234    /** draws an ellipse in the output device.
235     */
236    [oneway] void drawEllipse( [in] long X,
237             [in] long Y,
238             [in] long Width,
239             [in] long Height );
240
241    //-------------------------------------------------------------------------
242
243    /** draws an arc (part of a circle) in the output device.
244     */
245    [oneway] void drawArc( [in] long X,
246             [in] long Y,
247             [in] long Width,
248             [in] long Height,
249             [in] long X1,
250             [in] long Y1,
251             [in] long X2,
252             [in] long Y2 );
253
254    //-------------------------------------------------------------------------
255
256    /** draws a circular area in the output device.
257     */
258    [oneway] void drawPie( [in] long X,
259             [in] long Y,
260             [in] long Width,
261             [in] long Height,
262             [in] long X1,
263             [in] long Y1,
264             [in] long X2,
265             [in] long Y2 );
266
267    //-------------------------------------------------------------------------
268
269    /** draws a chord of a circular area in the output device.
270
271        <p>A chord is a segment of a circle. You get two chords from a
272        circle if you intersect the circle with a straight line
273        joining two points on the circle.</p>
274     */
275    [oneway] void drawChord( [in] long nX,
276             [in] long nY,
277             [in] long nWidth,
278             [in] long nHeight,
279             [in] long nX1,
280             [in] long nY1,
281             [in] long nX2,
282             [in] long nY2 );
283
284    //-------------------------------------------------------------------------
285
286    /** draws a color dispersion in the output device.
287     */
288    [oneway] void drawGradient( [in] long nX,
289             [in] long nY,
290             [in] long nWidth,
291             [in] long Height,
292             [in] Gradient aGradient );
293
294    //-------------------------------------------------------------------------
295
296    /** draws text in the output device.
297     */
298    [oneway] void drawText( [in] long X,
299             [in] long Y,
300             [in] string Text );
301
302    //-------------------------------------------------------------------------
303
304    /** draws texts in the output device using an explicit kerning table.
305     */
306    [oneway] void drawTextArray( [in] long X,
307             [in] long Y,
308             [in] string Text,
309             [in] sequence<long> Longs );
310
311};
312
313//=============================================================================
314
315}; }; }; };
316
317#endif
318