diff options
author | Dirk Voelzke <dv@openoffice.org> | 2010-04-22 09:31:31 +0200 |
---|---|---|
committer | Dirk Voelzke <dv@openoffice.org> | 2010-04-22 09:31:31 +0200 |
commit | a9e45f34fdc8deb88548f1833bb82a6ecdfcc5e7 (patch) | |
tree | 629f9cd084a8c73adcb21b43ff17576844972f2d /offapi | |
parent | a5763b54acc6c28acf17e24cbbd3bbd5ba356ad8 (diff) | |
parent | 39ca722d12345ead74d3d28df88564da477c70b6 (diff) |
dv12: merge with DEV300_m77
Diffstat (limited to 'offapi')
-rw-r--r-- | offapi/com/sun/star/rendering/TexturingMode.idl | 19 | ||||
-rw-r--r-- | offapi/com/sun/star/rendering/XGraphicDevice.idl | 67 | ||||
-rw-r--r-- | offapi/com/sun/star/rendering/XParametricPolyPolygon2DFactory.idl | 152 | ||||
-rw-r--r-- | offapi/com/sun/star/rendering/makefile.mk | 1 |
4 files changed, 78 insertions, 161 deletions
diff --git a/offapi/com/sun/star/rendering/TexturingMode.idl b/offapi/com/sun/star/rendering/TexturingMode.idl index 9d54940b9dcf..b44a78eae6ce 100644 --- a/offapi/com/sun/star/rendering/TexturingMode.idl +++ b/offapi/com/sun/star/rendering/TexturingMode.idl @@ -36,13 +36,24 @@ module com { module sun { module star { module rendering { */ constants TexturingMode { + /** Pixel outside the texture area are fully transparent.<p> + + This completely switches off pixel generation outside the + texture coordinate range [0,1]. This results in only one + instance of the texture generated per textured primitive.<p> + */ + const byte NONE=0; + + //------------------------------------------------------------------------- + /** Clamp texture coordinate.<p> - This value clamps the texture coordinate to the range + This value clamps the texture coordinates to the range [0,1]. This results in only one instance of the texture - generated per textured primitive.<p> + generated per textured primitive, with the remaining area + filled with the color of the outermost texels<p> */ - const byte CLAMP=0; + const byte CLAMP=1; //------------------------------------------------------------------------- @@ -51,7 +62,7 @@ constants TexturingMode This value repeats the texture over the textured primitive, for the given texture coordinate.<p> */ - const byte REPEAT=1; + const byte REPEAT=2; }; }; }; }; }; diff --git a/offapi/com/sun/star/rendering/XGraphicDevice.idl b/offapi/com/sun/star/rendering/XGraphicDevice.idl index c48f7e3e184d..a9caaefede7e 100644 --- a/offapi/com/sun/star/rendering/XGraphicDevice.idl +++ b/offapi/com/sun/star/rendering/XGraphicDevice.idl @@ -45,12 +45,12 @@ #ifndef __com_sun_star_rendering_XBezierPolyPolygon2D_idl__ #include <com/sun/star/rendering/XBezierPolyPolygon2D.idl> #endif -#ifndef __com_sun_star_rendering_XParametricPolyPolygon2DFactory_idl__ -#include <com/sun/star/rendering/XParametricPolyPolygon2DFactory.idl> -#endif #ifndef __com_sun_star_rendering_XColorSpace_idl__ #include <com/sun/star/rendering/XColorSpace.idl> #endif +#ifndef __com_sun_star_lang_XMultiServiceFactory_idl__ +#include <com/sun/star/lang/XMultiServiceFactory.idl> +#endif module com { module sun { module star { module rendering { @@ -217,8 +217,67 @@ interface XGraphicDevice : ::com::sun::star::uno::XInterface this is not advisable: each canvas implementation is free to internally generate optimized parametric polygons, which can be used more directly for e.g. texturing operations. + + <pre> + Available services (all canvas implementations should provide + this minimal set, though are free to add more; just check the + getAvailableServiceNames() on the returned interface): + + - Gradients - all gradients need to support two construction + parameters, "Colors" being a <type>sequence<Color></type> + and "Stops" being a <type>sequence<double></type>. Both must + have the same length, and at least two elements. See + http://www.w3.org/TR/SVG11/pservers.html#GradientStops for + the semantics of gradient stops and colors. + Required gradient services: + + * "LinearGradient" - the gradient varies linearly between + the given colors. without coordinate system + transformation, the color interpolation happens in + increasing x direction, and is constant in y + direction. Equivalent to svg linear gradient + http://www.w3.org/TR/SVG11/pservers.html#LinearGradients + + * "EllipticalGradient" - this gradient has zeroth color + index in the middle, and varies linearly between center + and final color. The services takes an additional + parameter named "AspectRatio" of <type>double</type> + (width divided by height), if this aspect ratio is 1, the + gradient is circular. If it's not 1, the gradient is + elliptical, with the special twist that the aspect ratio + is maintained also for the center color: the gradient will + not collapse into a single point, but become a line of + center color. If "AspectRatio" is missing, or equal to 1, + this gradient yields similar results as the svg radial + gradient + http://www.w3.org/TR/SVG11/pservers.html#RadialGradients + + * "RectangularGradient" - this gradient has zeroth color + index in the middle, and varies linearly between center + and final color via rectangular boxes + around the center point. The services takes an additional + parameter named "AspectRatio" of <type>double</type> + (width divided by height), if this aspect ratio is 1, the + gradient is quadratic. If it's not 1, the gradient is + rectangular, with the special twist that the aspect ratio + is maintained also for the center color: the gradient will + not collapse into a single point, but become a line of + center color. + + - Hatch patterns - Required hatch services: + + * "VerticalLineHatch" - this hatching consists of vertical lines + * "OrthogonalLinesHatch" - this hatching consists of + crossing vertical and horizontal lines + * "ThreeCrossingLinesHatch" - this hatching consists of + vertical and horizontal lines plus diagonal lines from + left, top to bottom, right. + * "FourCrossingLinesHatch" - this hatching consists of + vertical and horizontal lines plus diagonal lines in both + directions. + </pre> */ - XParametricPolyPolygon2DFactory getParametricPolyPolygonFactory(); + com::sun::star::lang::XMultiServiceFactory getParametricPolyPolygonFactory(); //------------------------------------------------------------------------- diff --git a/offapi/com/sun/star/rendering/XParametricPolyPolygon2DFactory.idl b/offapi/com/sun/star/rendering/XParametricPolyPolygon2DFactory.idl deleted file mode 100644 index 2471849864a1..000000000000 --- a/offapi/com/sun/star/rendering/XParametricPolyPolygon2DFactory.idl +++ /dev/null @@ -1,152 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef __com_sun_star_rendering_XParametricPolyPolygon2DFactory_idl__ -#define __com_sun_star_rendering_XParametricPolyPolygon2DFactory_idl__ - -#ifndef __com_sun_star_uno_XInterface_idl__ -#include <com/sun/star/uno/XInterface.idl> -#endif -#ifndef __com_sun_star_lang_IllegalArgumentException_idl__ -#include <com/sun/star/lang/IllegalArgumentException.idl> -#endif -#ifndef __com_sun_star_geometry_RealRectangle2D_idl__ -#include <com/sun/star/geometry/RealRectangle2D.idl> -#endif -#ifndef __com_sun_star_rendering_XColorSpace_idl__ -#include <com/sun/star/rendering/XColorSpace.idl> -#endif - - -module com { module sun { module star { module rendering { - -interface XParametricPolyPolygon2D; - -/** This interface provides factory methods to generate various - ready-made XParametricPolyPolygon2Ds - */ -interface XParametricPolyPolygon2DFactory : ::com::sun::star::uno::XInterface -{ - /** Create a linear gradient. - - The gradient varies linearly between colors. the color positions on <0, 1> interval are given by stops values - in the x direction, and has constant color for fixed x - coordinate value in y direction - */ - XParametricPolyPolygon2D createLinearHorizontalGradient( [in] sequence<Color> colors, [in] sequence<double> stops ) - raises (com::sun::star::lang::IllegalArgumentException); - - /** Create an axial gradient. - - The gradient has middleColor in the middle, and varies - linearly between middleColor and endColor to both sides in the - x direction. For fixed x coordinate, the gradient has constant - color value in y direction. - */ - XParametricPolyPolygon2D createAxialHorizontalGradient( [in] sequence<Color> colors, [in] sequence<double> stops ) - raises (com::sun::star::lang::IllegalArgumentException); - - /** Create an elliptical gradient. - - The gradient has centerColor in the middle, and varies - linearly between center and endColor via concentric ellipses - around the center point. Note that the absolute size of the - rectangle given at this method does not matter, only it's - aspect ratio: if this aspect ratio is 1, the gradient is - circular. If it's not 1, the gradient is elliptical, with the - special twist that the aspect ratio is maintained also for the - center color: the gradient will not collapse into a single - point, but become a line of center color. - */ - XParametricPolyPolygon2D createEllipticalGradient( [in] sequence<Color> colors, [in] sequence<double> stops, [in] ::com::sun::star::geometry::RealRectangle2D boundRect ) - raises (com::sun::star::lang::IllegalArgumentException); - - /** Create a rectangular gradient. - - The gradient has centerColor in the middle, and varies - linearly between center and endColor via rectangular boxes - around the center point. Note that the absolute size of the - rectangle given at this method does not matter, only it's - aspect ratio: if this aspect ratio is 1, the gradient is - quadratic. If it's not 1, the gradient is rectangular, with - the special twist that the aspect ratio is maintained also for - the center color: the gradient will not collapse into a single - point, but become a line of center color. - */ - XParametricPolyPolygon2D createRectangularGradient( [in] sequence<Color> colors, [in] sequence<double> stops, [in] ::com::sun::star::geometry::RealRectangle2D boundRect ) - raises (com::sun::star::lang::IllegalArgumentException); - - /** Create a line hash of vertical lines. - - The hashing consists of vertical lines, with colors varying - linearly between leftColor and rightColor, when going from - left to right - */ - XParametricPolyPolygon2D createVerticalLinesHatch( [in] sequence<ColorComponent> leftColor, [in] sequence<ColorComponent> rightColor ) - raises (com::sun::star::lang::IllegalArgumentException); - - /** Create a line hash of orthogonally crossing lines. - - The hashing consists of vertical and horizontal lines, with - colors varying linearly between leftTopColor and - rightBottomColor, when going from left to right (for the - vertical lines) and from top tzo bottom (for the horizontal - lines). - */ - XParametricPolyPolygon2D createOrthogonalLinesHatch( [in] sequence<ColorComponent> leftTopColor, [in] sequence<ColorComponent> rightBottomColor ) - raises (com::sun::star::lang::IllegalArgumentException); - - /** Create a repeating line hash pattern of three crossing lines. - - The hashing consists of vertical and horizontal lines plus - diagonal lines from left, top to bottom, right. Each of the - three groups of lines varies the line color of distinct lines - linearly from startColor to endColor, starting at the leftmost - or topmost position. - */ - XParametricPolyPolygon2D createThreeCrossingLinesHatch( [in] sequence<ColorComponent> startColor, [in] sequence<ColorComponent> endColor ) - raises (com::sun::star::lang::IllegalArgumentException); - - /** Create a repeating line hash pattern of four crossing lines. - - The hashing consists of vertical and horizontal lines plus - diagonal lines in both directions. Each of the four groups of - lines varies the line color of distinct lines linearly from - startColor to endColor, starting at the leftmost or topmost - position. - */ - XParametricPolyPolygon2D createFourCrossingLinesHatch( [in] sequence<ColorComponent> startColor, [in] sequence<ColorComponent> endColor ) - raises (com::sun::star::lang::IllegalArgumentException); -}; - -//============================================================================= - -/// Service providing a <type>XParametricPolyPolygon2DFactory</type> service -service ParametricPolyPolygon2DFactory: XParametricPolyPolygon2DFactory; - -}; }; }; }; - -#endif diff --git a/offapi/com/sun/star/rendering/makefile.mk b/offapi/com/sun/star/rendering/makefile.mk index 3ed9cf9c27e7..6b59d156d35e 100644 --- a/offapi/com/sun/star/rendering/makefile.mk +++ b/offapi/com/sun/star/rendering/makefile.mk @@ -104,7 +104,6 @@ IDLFILES=\ XIntegerReadOnlyBitmap.idl \ XLinePolyPolygon2D.idl \ XParametricPolyPolygon2D.idl \ - XParametricPolyPolygon2DFactory.idl \ XPolyPolygon2D.idl \ XSimpleCanvas.idl \ XSprite.idl \ |