merge the formfield patch from ooo-build
[ooovba.git] / offapi / com / sun / star / awt / XGraphics.idl
blob6659fc59dfc7c1b4529fd96f43088c8ea67a37b7
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XGraphics.idl,v $
10 * $Revision: 1.13 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef __com_sun_star_awt_XGraphics_idl__
31 #define __com_sun_star_awt_XGraphics_idl__
33 #ifndef __com_sun_star_uno_XInterface_idl__
34 #include <com/sun/star/uno/XInterface.idl>
35 #endif
37 #ifndef __com_sun_star_util_Color_idl__
38 #include <com/sun/star/util/Color.idl>
39 #endif
41 #ifndef __com_sun_star_awt_SimpleFontMetric_idl__
42 #include <com/sun/star/awt/SimpleFontMetric.idl>
43 #endif
45 #ifndef __com_sun_star_awt_FontDescriptor_idl__
46 #include <com/sun/star/awt/FontDescriptor.idl>
47 #endif
49 #ifndef __com_sun_star_awt_RasterOperation_idl__
50 #include <com/sun/star/awt/RasterOperation.idl>
51 #endif
53 #ifndef __com_sun_star_awt_Gradient_idl__
54 #include <com/sun/star/awt/Gradient.idl>
55 #endif
57 //=============================================================================
59 module com { module sun { module star { module awt {
61 published interface XRegion;
62 published interface XDisplayBitmap;
63 published interface XFont;
64 published interface XDevice;
66 //=============================================================================
68 /** provides the basic output operation of a device.
70 published interface XGraphics: com::sun::star::uno::XInterface
72 //-------------------------------------------------------------------------
74 /** returns the device of this graphics.
76 XDevice getDevice();
78 //-------------------------------------------------------------------------
80 /** returns the font metric of the current font.
82 SimpleFontMetric getFontMetric();
84 //-------------------------------------------------------------------------
86 /** sets the font used by text operations.
88 [oneway] void setFont( [in] XFont xNewFont );
90 //-------------------------------------------------------------------------
92 /** creates a new font and sets the font.
94 [oneway] void selectFont( [in] FontDescriptor aDescription );
96 //-------------------------------------------------------------------------
98 /** sets the text color used by text operations.
100 [oneway] void setTextColor( [in] com::sun::star::util::Color nColor );
102 //-------------------------------------------------------------------------
104 /** sets the fill color used by text operations.
106 [oneway] void setTextFillColor( [in] com::sun::star::util::Color nColor );
108 //-------------------------------------------------------------------------
110 /** sets the line color.
112 [oneway] void setLineColor( [in] com::sun::star::util::Color nColor );
114 //-------------------------------------------------------------------------
116 /** sets the fill color.
118 [oneway] void setFillColor( [in] com::sun::star::util::Color nColor );
120 //-------------------------------------------------------------------------
122 /** sets the raster operation.
124 <p>If the device does not support raster operations
125 then this call is ignored.</p>
127 [oneway] void setRasterOp( [in] RasterOperation ROP );
129 //-------------------------------------------------------------------------
131 /** sets the clip region to specified clipping.
133 [oneway] void setClipRegion( [in] XRegion Clipping );
135 //-------------------------------------------------------------------------
137 /** builds the intersection with the current region.
139 [oneway] void intersectClipRegion( [in] XRegion xClipping );
141 //-------------------------------------------------------------------------
143 /** saves all current settings (Font, TextColor, TextFillColor,
144 LineColor, FillColor, RasterOp, ClipRegion).
146 [oneway] void push();
148 //-------------------------------------------------------------------------
150 /** restores all previous saved settings.
152 [oneway] void pop();
154 //-------------------------------------------------------------------------
156 /** copies a rectangle of pixels from another device into this one.
158 [oneway] void copy( [in] XDevice xSource,
159 [in] long nSourceX,
160 [in] long nSourceY,
161 [in] long nSourceWidth,
162 [in] long nSourceHeight,
163 [in] long nDestX,
164 [in] long nDestY,
165 [in] long nDestWidth,
166 [in] long nDestHeight );
168 //-------------------------------------------------------------------------
170 /** draws a part of the specified bitmap to the output device.
172 [oneway] void draw( [in] XDisplayBitmap xBitmapHandle,
173 [in] long SourceX,
174 [in] long SourceY,
175 [in] long SourceWidth,
176 [in] long SourceHeight,
177 [in] long DestX,
178 [in] long DestY,
179 [in] long DestWidth,
180 [in] long DestHeight );
182 //-------------------------------------------------------------------------
184 /** sets a single pixel in the output device.
186 [oneway] void drawPixel( [in] long X,
187 [in] long Y );
189 //-------------------------------------------------------------------------
191 /** draws a line in the output device.
193 [oneway] void drawLine( [in] long X1,
194 [in] long Y1,
195 [in] long X2,
196 [in] long Y2 );
198 //-------------------------------------------------------------------------
200 /** draws a rectangle in the output device.
202 [oneway] void drawRect( [in] long X,
203 [in] long Y,
204 [in] long Width,
205 [in] long Height );
207 //-------------------------------------------------------------------------
209 /** draws a rectangle with rounded corners in the output device.
211 [oneway] void drawRoundedRect( [in] long X,
212 [in] long Y,
213 [in] long Width,
214 [in] long Height,
215 [in] long nHorzRound,
216 [in] long nVertRound );
218 //-------------------------------------------------------------------------
220 /** draws multiple lines in the output device at once.
222 [oneway] void drawPolyLine( [in] sequence<long> DataX,
223 [in] sequence<long> DataY );
225 //-------------------------------------------------------------------------
227 /** draws a polygon line in the output device.
229 [oneway] void drawPolygon( [in] sequence<long> DataX,
230 [in] sequence<long> DataY );
232 //-------------------------------------------------------------------------
234 /** draws multiple polygons in the output device at once.
236 [oneway] void drawPolyPolygon( [in] sequence< sequence<long> > DataX,
237 [in] sequence< sequence<long> > DataY );
239 //-------------------------------------------------------------------------
241 /** draws an ellipse in the output device.
243 [oneway] void drawEllipse( [in] long X,
244 [in] long Y,
245 [in] long Width,
246 [in] long Height );
248 //-------------------------------------------------------------------------
250 /** draws an arc (part of a circle) in the output device.
252 [oneway] void drawArc( [in] long X,
253 [in] long Y,
254 [in] long Width,
255 [in] long Height,
256 [in] long X1,
257 [in] long Y1,
258 [in] long X2,
259 [in] long Y2 );
261 //-------------------------------------------------------------------------
263 /** draws a circular area in the output device.
265 [oneway] void drawPie( [in] long X,
266 [in] long Y,
267 [in] long Width,
268 [in] long Height,
269 [in] long X1,
270 [in] long Y1,
271 [in] long X2,
272 [in] long Y2 );
274 //-------------------------------------------------------------------------
276 /** draws a chord of a circular area in the output device.
278 <p>A chord is a segment of a circle. You get two chords from a
279 circle if you intersect the circle with a straight line
280 joining two points on the circle.</p>
282 [oneway] void drawChord( [in] long nX,
283 [in] long nY,
284 [in] long nWidth,
285 [in] long nHeight,
286 [in] long nX1,
287 [in] long nY1,
288 [in] long nX2,
289 [in] long nY2 );
291 //-------------------------------------------------------------------------
293 /** draws a color dispersion in the output device.
295 [oneway] void drawGradient( [in] long nX,
296 [in] long nY,
297 [in] long nWidth,
298 [in] long Height,
299 [in] Gradient aGradient );
301 //-------------------------------------------------------------------------
303 /** draws text in the output device.
305 [oneway] void drawText( [in] long X,
306 [in] long Y,
307 [in] string Text );
309 //-------------------------------------------------------------------------
311 /** draws texts in the output device using an explicit kerning table.
313 [oneway] void drawTextArray( [in] long X,
314 [in] long Y,
315 [in] string Text,
316 [in] sequence<long> Longs );
320 //=============================================================================
322 }; }; }; };
324 #endif