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