diff options
Diffstat (limited to 'offapi/com/sun/star/rendering/XColorSpace.idl')
-rw-r--r-- | offapi/com/sun/star/rendering/XColorSpace.idl | 60 |
1 files changed, 51 insertions, 9 deletions
diff --git a/offapi/com/sun/star/rendering/XColorSpace.idl b/offapi/com/sun/star/rendering/XColorSpace.idl index 32152e1aa957..dbd731979039 100644 --- a/offapi/com/sun/star/rendering/XColorSpace.idl +++ b/offapi/com/sun/star/rendering/XColorSpace.idl @@ -1,4 +1,3 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * @@ -16,25 +15,69 @@ * 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_rendering_XColorSpace_idl__ #define __com_sun_star_rendering_XColorSpace_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_beans_PropertyValue_idl__ #include <com/sun/star/beans/PropertyValue.idl> +#endif +#ifndef __com_sun_star_rendering_ColorProfile_idl__ #include <com/sun/star/rendering/ColorProfile.idl> -#include <com/sun/star/rendering/ColorComponent.idl> -#include <com/sun/star/rendering/RGBColor.idl> -#include <com/sun/star/rendering/ARGBColor.idl> +#endif module com { module sun { module star { module rendering { +/// Shorthand for the device-dependent color components, and easier to read +published typedef double ColorComponent; +published typedef sequence<ColorComponent> Color; + +//============================================================================= + +/// RGB color triplet +published struct RGBColor +{ + /// Red component. Valid range is [0,1.0] + ColorComponent Red; + /// Green component. Valid range is [0,1.0] + ColorComponent Green; + /// Blue component. Valid range is [0,1.0] + ColorComponent Blue; +}; + +//============================================================================= + +/// ARGB color quad +published struct ARGBColor +{ + /** Alpha component.<p> + + Valid range is [0,1.0], with 0.0 denoting fully transparent, + and 1.0 fully opaque. + */ + ColorComponent Alpha; + /// Red component. Valid range is [0,1.0] + ColorComponent Red; + /// Green component. Valid range is [0,1.0] + ColorComponent Green; + /// Blue component. Valid range is [0,1.0] + ColorComponent Blue; +}; + +//============================================================================= + /** Information how to interpret certain color data.<p> This interface encapsulates all information that is necessary to interpret color data, by defining a describing color space, like for example CMYK or sRGB. You can either convert between this and - an arbitrary other color space, or into the standard RGB or ARGB + an arbitrary other colorspace, or into the standard RGB or ARGB formats (because those are so overwhelmingly common in computer graphics).<p> @@ -44,7 +87,7 @@ module com { module sun { module star { module rendering { e.g. <type>XIntegerBitmapColorSpace</type>, which use sequences of integers for color representation.<p> */ -interface XColorSpace +published interface XColorSpace { /** Query type of this color space.<p> @@ -90,6 +133,7 @@ interface XColorSpace sequence< ::com::sun::star::beans::PropertyValue > getProperties(); + //============================================================================= /** Convert to color of another color space.<p> @@ -180,7 +224,7 @@ interface XColorSpace /** Convert sRGB color to a representation in this color space.<p> If this color space conveys alpha information, it is assumed - be fully opaque for the given RGB color value. + be fully opaque for the given rgb color value. @param deviceColor Sequence of sRGB color components. Is permitted to contain more than one color element, therefore, @@ -238,5 +282,3 @@ interface XColorSpace }; }; }; }; #endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |