1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XGraphics.idl,v $
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
>
37 #ifndef __com_sun_star_util_Color_idl__
38 #include
<com
/sun
/star
/util
/Color.idl
>
41 #ifndef __com_sun_star_awt_SimpleFontMetric_idl__
42 #include
<com
/sun
/star
/awt
/SimpleFontMetric.idl
>
45 #ifndef __com_sun_star_awt_FontDescriptor_idl__
46 #include
<com
/sun
/star
/awt
/FontDescriptor.idl
>
49 #ifndef __com_sun_star_awt_RasterOperation_idl__
50 #include
<com
/sun
/star
/awt
/RasterOperation.idl
>
53 #ifndef __com_sun_star_awt_Gradient_idl__
54 #include
<com
/sun
/star
/awt
/Gradient.idl
>
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.
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.
154 //-------------------------------------------------------------------------
156 /** copies a rectangle of pixels from another device into this one.
158 [oneway
] void copy
( [in] XDevice xSource
,
161 [in] long nSourceWidth
,
162 [in] long nSourceHeight
,
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
,
175 [in] long SourceWidth
,
176 [in] long SourceHeight
,
180 [in] long DestHeight
);
182 //-------------------------------------------------------------------------
184 /** sets a single pixel in the output device.
186 [oneway
] void drawPixel
( [in] long X
,
189 //-------------------------------------------------------------------------
191 /** draws a line in the output device.
193 [oneway
] void drawLine
( [in] long X1
,
198 //-------------------------------------------------------------------------
200 /** draws a rectangle in the output device.
202 [oneway
] void drawRect
( [in] long X
,
207 //-------------------------------------------------------------------------
209 /** draws a rectangle with rounded corners in the output device.
211 [oneway
] void drawRoundedRect
( [in] long X
,
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
,
248 //-------------------------------------------------------------------------
250 /** draws an arc (part of a circle) in the output device.
252 [oneway
] void drawArc
( [in] long X
,
261 //-------------------------------------------------------------------------
263 /** draws a circular area in the output device.
265 [oneway
] void drawPie
( [in] long X
,
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
,
291 //-------------------------------------------------------------------------
293 /** draws a color dispersion in the output device.
295 [oneway
] void drawGradient
( [in] long nX
,
299 [in] Gradient aGradient
);
301 //-------------------------------------------------------------------------
303 /** draws text in the output device.
305 [oneway
] void drawText
( [in] long X
,
309 //-------------------------------------------------------------------------
311 /** draws texts in the output device using an explicit kerning table.
313 [oneway
] void drawTextArray
( [in] long X
,
316 [in] sequence
<long> Longs
);
320 //=============================================================================