summaryrefslogtreecommitdiff
path: root/offapi/com/sun
diff options
context:
space:
mode:
authorAriel Constenla-Haile <arielch@apache.org>2012-12-06 12:28:11 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-05-21 14:01:16 +0100
commitf858fa266d8b33ccc27bb6a91f1923b9ea9cdaaa (patch)
treea1591cd5dca88c16a3d22e9256162954ab9775ba /offapi/com/sun
parent5dd32f76a9c0f924e6a514e309e7661ad5537e86 (diff)
Related: #i121442# - Extend css::awt::XGraphic to draw images
A StatusbarController that draws its status bar item may need to draw a graphic representing the feature state. css::awt::XGraphics API should be extended to include VCL's OuptDevice::DrawImage (cherry picked from commit 3ca8e86d4489f023160d69ba621a819a89ab90d5) Conflicts: offapi/com/sun/star/awt/XGraphics.idl offapi/com/sun/star/awt/makefile.mk offapi/type_reference/types.rdb toolkit/inc/toolkit/awt/vclxgraphics.hxx toolkit/source/awt/vclxgraphics.cxx Change-Id: If2c37022e60e8a3c9fce51dac84f4a2af001b5c5
Diffstat (limited to 'offapi/com/sun')
-rw-r--r--offapi/com/sun/star/awt/ImageDrawMode.idl55
-rw-r--r--offapi/com/sun/star/awt/XGraphics.idl126
2 files changed, 121 insertions, 60 deletions
diff --git a/offapi/com/sun/star/awt/ImageDrawMode.idl b/offapi/com/sun/star/awt/ImageDrawMode.idl
new file mode 100644
index 000000000000..ae83384b7b42
--- /dev/null
+++ b/offapi/com/sun/star/awt/ImageDrawMode.idl
@@ -0,0 +1,55 @@
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef __com_sun_star_awt_ImageDrawMode_idl__
+#define __com_sun_star_awt_ImageDrawMode_idl__
+
+module com { module sun { module star { module awt {
+
+/** defines modes how an image is drawn onto a device
+
+ @see <member scope="com::sun::star::awt">XGraphics2::drawImage</member>
+ @since LibreOffice 4.1
+ */
+constants ImageDrawMode
+{
+ /** the image is drawn as is, without any color transformation.
+ */
+ const short NONE = 0x0000;
+
+ /** the image is drawn as if it represented a feature whose state is disabled.
+ */
+ const short DISABLE = 0x0001;
+
+ /** the image is drawn as being highlighted.
+ See <member scope="com::sun::star::awt">XStyleSettings::HighlightColor</member>.
+ */
+ const short HIGHLIGHT = 0x0002;
+
+ /** the image is drawn as being deactivated.
+ See <member scope="com::sun::star::awt">XStyleSettings::DeactiveColor</member>.
+ */
+ const short DEACTIVE = 0x0004;
+
+ /** the image is drawn semi-transparent.
+ */
+ const short SEMITRANSPARENT = 0x0010;
+};
+
+}; }; }; };
+
+#endif
diff --git a/offapi/com/sun/star/awt/XGraphics.idl b/offapi/com/sun/star/awt/XGraphics.idl
index 78e132c0515d..845d265d9fdb 100644
--- a/offapi/com/sun/star/awt/XGraphics.idl
+++ b/offapi/com/sun/star/awt/XGraphics.idl
@@ -20,98 +20,86 @@
#define __com_sun_star_awt_XGraphics_idl__
#include <com/sun/star/uno/XInterface.idl>
-
#include <com/sun/star/util/Color.idl>
#include <com/sun/star/awt/SimpleFontMetric.idl>
-
#include <com/sun/star/awt/FontDescriptor.idl>
-
#include <com/sun/star/awt/RasterOperation.idl>
-
#include <com/sun/star/awt/Gradient.idl>
+#include <com/sun/star/awt/Rectangle.idl>
+#include <com/sun/star/graphic/XGraphic.idl>
+module com { module sun { module star { module awt {
- module com { module sun { module star { module awt {
-
- published interface XRegion;
- published interface XDisplayBitmap;
- published interface XFont;
- published interface XDevice;
-
+published interface XRegion;
+published interface XDisplayBitmap;
+published interface XFont;
+published interface XDevice;
/** provides the basic output operation of a device.
*/
published interface XGraphics: com::sun::star::uno::XInterface
{
-
- /** returns the device of this graphics.
+ /** the device of this graphics
*/
- XDevice getDevice();
+ [attribute, readonly] XDevice Device;
-
- /** returns the font metric of the current font.
+ /** the text color used by text operations.
*/
- SimpleFontMetric getFontMetric();
-
+ [attribute] com::sun::star::util::Color TextColor;
- /** sets the font used by text operations.
+ /** the fill color used by text operations.
*/
- void setFont( [in] XFont xNewFont );
-
+ [attribute] com::sun::star::util::Color TextFillColor;
- /** creates a new font and sets the font.
+ /** the line color.
*/
- void selectFont( [in] FontDescriptor aDescription );
-
+ [attribute] com::sun::star::util::Color LineColor;
- /** sets the text color used by text operations.
+ /** the fill color.
*/
- void setTextColor( [in] com::sun::star::util::Color nColor );
+ [attribute] com::sun::star::util::Color FillColor;
+ /** the raster operation.
- /** sets the fill color used by text operations.
+ <p>If the device does not support raster operations,
+ this attribute is ignored.</p>
*/
- void setTextFillColor( [in] com::sun::star::util::Color nColor );
+ [attribute] RasterOperation RasterOp;
-
- /** sets the line color.
+ /** the font used by text operations.
*/
- void setLineColor( [in] com::sun::star::util::Color nColor );
-
+ [attribute] XFont Font;
- /** sets the fill color.
+ /** the font metric of the current font.
*/
- void setFillColor( [in] com::sun::star::util::Color nColor );
-
-
- /** sets the raster operation.
+ [attribute, readonly] SimpleFontMetric FontMetric;
- <p>If the device does not support raster operations
- then this call is ignored.</p>
+ /** creates a new font and sets the font.
*/
- void setRasterOp( [in] RasterOperation ROP );
-
+ void selectFont( [in] FontDescriptor aDescription );
/** sets the clip region to specified clipping.
*/
void setClipRegion( [in] XRegion Clipping );
-
/** builds the intersection with the current region.
*/
void intersectClipRegion( [in] XRegion xClipping );
-
/** saves all current settings (Font, TextColor, TextFillColor,
LineColor, FillColor, RasterOp, ClipRegion).
*/
void push();
-
/** restores all previous saved settings.
*/
void pop();
+ /** clears the given rectangle on the device
+
+ @since LibreOffice 4.1
+ */
+ void clear( [in] Rectangle aRect );
/** copies a rectangle of pixels from another device into this one.
*/
@@ -125,7 +113,6 @@ published interface XGraphics: com::sun::star::uno::XInterface
[in] long nDestWidth,
[in] long nDestHeight );
-
/** draws a part of the specified bitmap to the output device.
*/
void draw( [in] XDisplayBitmap xBitmapHandle,
@@ -138,13 +125,11 @@ published interface XGraphics: com::sun::star::uno::XInterface
[in] long DestWidth,
[in] long DestHeight );
-
/** sets a single pixel in the output device.
*/
void drawPixel( [in] long X,
[in] long Y );
-
/** draws a line in the output device.
*/
void drawLine( [in] long X1,
@@ -152,7 +137,6 @@ published interface XGraphics: com::sun::star::uno::XInterface
[in] long X2,
[in] long Y2 );
-
/** draws a rectangle in the output device.
*/
void drawRect( [in] long X,
@@ -160,7 +144,6 @@ published interface XGraphics: com::sun::star::uno::XInterface
[in] long Width,
[in] long Height );
-
/** draws a rectangle with rounded corners in the output device.
*/
void drawRoundedRect( [in] long X,
@@ -170,25 +153,21 @@ published interface XGraphics: com::sun::star::uno::XInterface
[in] long nHorzRound,
[in] long nVertRound );
-
/** draws multiple lines in the output device at once.
*/
void drawPolyLine( [in] sequence<long> DataX,
[in] sequence<long> DataY );
-
/** draws a polygon line in the output device.
*/
void drawPolygon( [in] sequence<long> DataX,
[in] sequence<long> DataY );
-
/** draws multiple polygons in the output device at once.
*/
void drawPolyPolygon( [in] sequence< sequence<long> > DataX,
[in] sequence< sequence<long> > DataY );
-
/** draws an ellipse in the output device.
*/
void drawEllipse( [in] long X,
@@ -196,7 +175,6 @@ published interface XGraphics: com::sun::star::uno::XInterface
[in] long Width,
[in] long Height );
-
/** draws an arc (part of a circle) in the output device.
*/
void drawArc( [in] long X,
@@ -208,7 +186,6 @@ published interface XGraphics: com::sun::star::uno::XInterface
[in] long X2,
[in] long Y2 );
-
/** draws a circular area in the output device.
*/
void drawPie( [in] long X,
@@ -220,7 +197,6 @@ published interface XGraphics: com::sun::star::uno::XInterface
[in] long X2,
[in] long Y2 );
-
/** draws a chord of a circular area in the output device.
<p>A chord is a segment of a circle. You get two chords from a
@@ -236,7 +212,6 @@ published interface XGraphics: com::sun::star::uno::XInterface
[in] long nX2,
[in] long nY2 );
-
/** draws a color dispersion in the output device.
*/
void drawGradient( [in] long nX,
@@ -245,14 +220,12 @@ published interface XGraphics: com::sun::star::uno::XInterface
[in] long Height,
[in] Gradient aGradient );
-
/** draws text in the output device.
*/
void drawText( [in] long X,
[in] long Y,
[in] string Text );
-
/** draws texts in the output device using an explicit kerning table.
*/
void drawTextArray( [in] long X,
@@ -260,8 +233,41 @@ published interface XGraphics: com::sun::star::uno::XInterface
[in] string Text,
[in] sequence<long> Longs );
-};
+ /** draws a <type scope="com::sun::star::graphic">XGraphic</type>
+ in the output device.
+
+ <p>Note that some devices may not support this operation.</p>
+
+ @since LibreOffice 4.1
+
+ @param nX
+ the X coordinate on the device where the graphic will be drawn
+
+ @param nY
+ the Y coordinate on the device where the graphic will be drawn
+ @param nWidth
+ the width of the region on the device
+
+ @param nHeight
+ the height of the region on the device
+
+ @param nStyle
+ the style used to draw the image.
+ See <type scope="com::sun::star::awt">ImageDrawMode</type>.
+
+ @param aGraphic
+ the <type scope="com::sun::star::graphic">XGraphic</type>
+ to be drawn onto the device
+ */
+ void drawImage( [in] long nX,
+ [in] long nY,
+ [in] long nWidth,
+ [in] long nHeight,
+ [in] short nStyle,
+ [in] ::com::sun::star::graphic::XGraphic aGraphic );
+
+};
}; }; }; };