Kaydet (Commit) 9c7872ac authored tarafından Norbert Thiebaud's avatar Norbert Thiebaud

rebase XColorSpace and XBitmapCanvas

Change-Id: I9283e1d444a52970905d9af4d451d52834f1537b
üst d4400fae
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* 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_rendering_ARGBColor_idl__
#define __com_sun_star_rendering_ARGBColor_idl__
#ifndef __com_sun_star_rendering_ColorComponent_idl__
#include <com/sun/star/rendering/ColorComponent.idl>
#endif
module com { module sun { module star { module rendering {
/// ARGB color quad
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;
};
}; }; }; };
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* 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_BitmapCanvas_idl__
#define __com_sun_star_rendering_BitmapCanvas_idl__
#ifndef __com_sun_star_rendering_XBitmap_idl__
#include <com/sun/star/rendering/XBitmap.idl>
#endif
#ifndef __com_sun_star_rendering_XBitmapCanvas_idl__
#include <com/sun/star/rendering/XBitmapCanvas.idl>
#endif
module com { module sun { module star { module rendering {
// TODO: Multiple-inheritance interfaces
/** This service provides the interfaces for a <type>XBitmapCanvas</type>
*/
service BitmapCanvas
{
/** Canvas interface, to issue rendering operations.
*/
interface XBitmapCanvas;
/** Bitmap interface, to directly manipulate the pixel.
*/
interface XBitmap;
};
}; }; }; };
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* 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_Color_idl__
#define __com_sun_star_rendering_Color_idl__
#ifndef __com_sun_star_rendering_ColorComponent_idl__
#include <com/sun/star/rendering/ColorComponent.idl>
#endif
module com { module sun { module star { module rendering {
/// Shorthand for the device-dependent color components, and easier to read
typedef sequence<ColorComponent> Color;
}; }; }; };
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* 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_ColorComponent_idl__
#define __com_sun_star_rendering_ColorComponent_idl__
module com { module sun { module star { module rendering {
/// Shorthand for the device-dependent color components, and easier to read
typedef double ColorComponent;
}; }; }; };
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* 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_RGBColor_idl__
#define __com_sun_star_rendering_RGBColor_idl__
#ifndef __com_sun_star_rendering_ColorComponent_idl__
#include <com/sun/star/rendering/ColorComponent.idl>
#endif
module com { module sun { module star { module rendering {
/// RGB color triplet
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;
};
}; }; }; };
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* /*
* This file is part of the LibreOffice project. * This file is part of the LibreOffice project.
* *
...@@ -16,15 +15,31 @@ ...@@ -16,15 +15,31 @@
* except in compliance with the License. You may obtain a copy of * except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#ifndef __com_sun_star_rendering_XBitmapCanvas_idl__ #ifndef __com_sun_star_rendering_XBitmapCanvas_idl__
#define __com_sun_star_rendering_XBitmapCanvas_idl__ #define __com_sun_star_rendering_XBitmapCanvas_idl__
#ifndef __com_sun_star_uno_XInterface_idl__
#include <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> #include <com/sun/star/lang/IllegalArgumentException.idl>
#endif
#ifndef __com_sun_star_geometry_RealRectangle2D_idl__
#include <com/sun/star/geometry/RealRectangle2D.idl> #include <com/sun/star/geometry/RealRectangle2D.idl>
#endif
#ifndef __com_sun_star_rendering_RenderState_idl__
#include <com/sun/star/rendering/RenderState.idl> #include <com/sun/star/rendering/RenderState.idl>
#endif
#ifndef __com_sun_star_rendering_XBitmap_idl__
#include <com/sun/star/rendering/XBitmap.idl>
#endif
#ifndef __com_sun_star_rendering_XCanvas_idl__
#include <com/sun/star/rendering/XCanvas.idl> #include <com/sun/star/rendering/XCanvas.idl>
#endif
#ifndef __com_sun_star_rendering_VolatileContentDestroyedException_idl__
#include <com/sun/star/rendering/VolatileContentDestroyedException.idl> #include <com/sun/star/rendering/VolatileContentDestroyedException.idl>
#endif
module com { module sun { module star { module rendering { module com { module sun { module star { module rendering {
...@@ -38,7 +53,7 @@ module com { module sun { module star { module rendering { ...@@ -38,7 +53,7 @@ module com { module sun { module star { module rendering {
@since OOo 2.0 @since OOo 2.0
*/ */
interface XBitmapCanvas : XCanvas published interface XBitmapCanvas : XCanvas
{ {
/** This method copies a rectangular area from a place of one /** This method copies a rectangular area from a place of one
canvas to a place on another.<p> canvas to a place on another.<p>
...@@ -106,8 +121,23 @@ interface XBitmapCanvas : XCanvas ...@@ -106,8 +121,23 @@ interface XBitmapCanvas : XCanvas
}; };
//=============================================================================
// TODO: Multiple-inheritance interfaces
/** This service provides the interfaces for a <type>XBitmapCanvas</type>
*/
service BitmapCanvas
{
/** Canvas interface, to issue rendering operations.
*/
interface XBitmapCanvas;
/** Bitmap interface, to directly manipulate the pixel.
*/
interface XBitmap;
};
}; }; }; }; }; }; }; };
#endif #endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* /*
* This file is part of the LibreOffice project. * This file is part of the LibreOffice project.
* *
...@@ -16,25 +15,69 @@ ...@@ -16,25 +15,69 @@
* except in compliance with the License. You may obtain a copy of * except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#ifndef __com_sun_star_rendering_XColorSpace_idl__ #ifndef __com_sun_star_rendering_XColorSpace_idl__
#define __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> #include <com/sun/star/uno/XInterface.idl>
#endif
#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
#include <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> #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/ColorProfile.idl>
#include <com/sun/star/rendering/ColorComponent.idl> #endif
#include <com/sun/star/rendering/RGBColor.idl>
#include <com/sun/star/rendering/ARGBColor.idl>
module com { module sun { module star { module rendering { 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> /** Information how to interpret certain color data.<p>
This interface encapsulates all information that is necessary to This interface encapsulates all information that is necessary to
interpret color data, by defining a describing color space, like interpret color data, by defining a describing color space, like
for example CMYK or sRGB. You can either convert between this and 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 formats (because those are so overwhelmingly common in computer
graphics).<p> graphics).<p>
...@@ -44,7 +87,7 @@ module com { module sun { module star { module rendering { ...@@ -44,7 +87,7 @@ module com { module sun { module star { module rendering {
e.g. <type>XIntegerBitmapColorSpace</type>, which use sequences of e.g. <type>XIntegerBitmapColorSpace</type>, which use sequences of
integers for color representation.<p> integers for color representation.<p>
*/ */
interface XColorSpace published interface XColorSpace
{ {
/** Query type of this color space.<p> /** Query type of this color space.<p>
...@@ -90,6 +133,7 @@ interface XColorSpace ...@@ -90,6 +133,7 @@ interface XColorSpace
sequence< ::com::sun::star::beans::PropertyValue > getProperties(); sequence< ::com::sun::star::beans::PropertyValue > getProperties();
//=============================================================================
/** Convert to color of another color space.<p> /** Convert to color of another color space.<p>
...@@ -180,7 +224,7 @@ interface XColorSpace ...@@ -180,7 +224,7 @@ interface XColorSpace
/** Convert sRGB color to a representation in this color space.<p> /** Convert sRGB color to a representation in this color space.<p>
If this color space conveys alpha information, it is assumed 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 @param deviceColor Sequence of sRGB color components. Is
permitted to contain more than one color element, therefore, permitted to contain more than one color element, therefore,
...@@ -238,5 +282,3 @@ interface XColorSpace ...@@ -238,5 +282,3 @@ interface XColorSpace
}; }; }; }; }; }; }; };
#endif #endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment