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