1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef __com_sun_star_awt_XGraphics_idl__
20 #define __com_sun_star_awt_XGraphics_idl__
22 #include
<com
/sun
/star
/uno
/XInterface.idl
>
23 #include
<com
/sun
/star
/util
/Color.idl
>
24 #include
<com
/sun
/star
/awt
/SimpleFontMetric.idl
>
25 #include
<com
/sun
/star
/awt
/FontDescriptor.idl
>
26 #include
<com
/sun
/star
/awt
/RasterOperation.idl
>
27 #include
<com
/sun
/star
/awt
/Gradient.idl
>
30 module com
{ module sun
{ module star
{ module awt
{
32 published
interface XRegion
;
33 published
interface XDisplayBitmap
;
34 published
interface XFont
;
35 published
interface XDevice
;
38 /** provides the basic output operation of a device.
40 published
interface XGraphics
: com
::sun
::star
::uno
::XInterface
42 /** returns the device of this graphics.
46 /** returns the font metric of the current font.
48 SimpleFontMetric getFontMetric
();
50 /** sets the font used by text operations.
52 void setFont
( [in] XFont xNewFont
);
54 /** creates a new font and sets the font.
56 void selectFont
( [in] FontDescriptor aDescription
);
58 /** sets the text color used by text operations.
60 void setTextColor
( [in] com
::sun
::star
::util
::Color nColor
);
62 /** sets the fill color used by text operations.
64 void setTextFillColor
( [in] com
::sun
::star
::util
::Color nColor
);
66 /** sets the line color.
68 void setLineColor
( [in] com
::sun
::star
::util
::Color nColor
);
70 /** sets the fill color.
72 void setFillColor
( [in] com
::sun
::star
::util
::Color nColor
);
74 /** sets the raster operation.
76 <p>If the device does not support raster operations
77 then this call is ignored.</p>
79 void setRasterOp
( [in] RasterOperation ROP
);
81 /** sets the clip region to specified clipping.
83 void setClipRegion
( [in] XRegion Clipping
);
85 /** builds the intersection with the current region.
87 void intersectClipRegion
( [in] XRegion xClipping
);
89 /** saves all current settings (Font, TextColor, TextFillColor,
90 LineColor, FillColor, RasterOp, ClipRegion).
94 /** restores all previous saved settings.
98 /** copies a rectangle of pixels from another device into this one.
100 void copy
( [in] XDevice xSource
,
103 [in] long nSourceWidth
,
104 [in] long nSourceHeight
,
107 [in] long nDestWidth
,
108 [in] long nDestHeight
);
110 /** draws a part of the specified bitmap to the output device.
112 void draw
( [in] XDisplayBitmap xBitmapHandle
,
115 [in] long SourceWidth
,
116 [in] long SourceHeight
,
120 [in] long DestHeight
);
122 /** sets a single pixel in the output device.
124 void drawPixel
( [in] long X
,
127 /** draws a line in the output device.
129 void drawLine
( [in] long X1
,
134 /** draws a rectangle in the output device.
136 void drawRect
( [in] long X
,
141 /** draws a rectangle with rounded corners in the output device.
143 void drawRoundedRect
( [in] long X
,
147 [in] long nHorzRound
,
148 [in] long nVertRound
);
150 /** draws multiple lines in the output device at once.
152 void drawPolyLine
( [in] sequence
<long> DataX
,
153 [in] sequence
<long> DataY
);
155 /** draws a polygon line in the output device.
157 void drawPolygon
( [in] sequence
<long> DataX
,
158 [in] sequence
<long> DataY
);
160 /** draws multiple polygons in the output device at once.
162 void drawPolyPolygon
( [in] sequence
< sequence
<long> > DataX
,
163 [in] sequence
< sequence
<long> > DataY
);
165 /** draws an ellipse in the output device.
167 void drawEllipse
( [in] long X
,
172 /** draws an arc (part of a circle) in the output device.
174 void drawArc
( [in] long X
,
183 /** draws a circular area in the output device.
185 void drawPie
( [in] long X
,
194 /** draws a chord of a circular area in the output device.
196 <p>A chord is a segment of a circle. You get two chords from a
197 circle if you intersect the circle with a straight line
198 joining two points on the circle.</p>
200 void drawChord
( [in] long nX
,
209 /** draws a color dispersion in the output device.
211 void drawGradient
( [in] long nX
,
215 [in] Gradient aGradient
);
217 /** draws text in the output device.
219 void drawText
( [in] long X
,
223 /** draws texts in the output device using an explicit kerning table.
225 void drawTextArray
( [in] long X
,
228 [in] sequence
<long> Longs
);
236 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */