1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org.  If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
25 *
26 ************************************************************************/
27#ifndef __com_sun_star_rendering_XBitmapCanvas_idl__
28#define __com_sun_star_rendering_XBitmapCanvas_idl__
29
30#ifndef __com_sun_star_uno_XInterface_idl__
31#include <com/sun/star/uno/XInterface.idl>
32#endif
33#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
34#include <com/sun/star/lang/IllegalArgumentException.idl>
35#endif
36#ifndef __com_sun_star_geometry_RealRectangle2D_idl__
37#include <com/sun/star/geometry/RealRectangle2D.idl>
38#endif
39#ifndef __com_sun_star_rendering_RenderState_idl__
40#include <com/sun/star/rendering/RenderState.idl>
41#endif
42#ifndef __com_sun_star_rendering_XBitmap_idl__
43#include <com/sun/star/rendering/XBitmap.idl>
44#endif
45#ifndef __com_sun_star_rendering_XCanvas_idl__
46#include <com/sun/star/rendering/XCanvas.idl>
47#endif
48#ifndef __com_sun_star_rendering_VolatileContentDestroyedException_idl__
49#include <com/sun/star/rendering/VolatileContentDestroyedException.idl>
50#endif
51
52
53module com { module sun { module star { module rendering {
54
55/** This is a specialization of the canvas interface for bitmapped
56    canvases.<p>
57
58    This interface is a specialization of the canvas interface for
59    bitmapped canvases, where additional methods for accessing and
60    moving of bitmap content are provided.<p>
61
62    @since OOo 2.0
63 */
64published interface XBitmapCanvas : XCanvas
65{
66    /** This method copies a rectangular area from a place of one
67        canvas to a place on another.<p>
68
69        This method copies a rectangular area from a place of one
70        canvas to a place on another. Source and destination areas are
71        permitted to overlap. If the source view or render state has a
72        clipping set, the regions clipped away from the source
73        rectangle are regarded fully transparent for the copy
74        operation. The device color for both source and destination
75        render state is ignored, the compositing mode only for the
76        source render state.<p>
77
78        @param sourceCanvas
79        Canvas from which to copy the bitmap data. Can be identical to
80        the canvas this method is called on, but must be valid.
81
82        @param sourceRect
83        Rectangle from which to copy the bitmap data. This rectangle
84        is subject to both view and render transformation, before
85        being applied. Thus, on screen, it does not necessarily
86        resemble a rectangle any more. The rectangle must be
87        non-empty, see
88        <type scope="::com::sun::star::geometry">RealRectangle2D</type>
89        for details.
90
91        @param sourceViewState
92        The view state to apply to the source of this copy
93        operation. The view transformation must be non-singular.
94
95        @param sourceRenderState
96        The render state to apply to the source of this copy
97        operation. The render transformation must be non-singular, and
98        the compositing mode must be one of the
99        <type>CompositingOperation</type> values.
100
101        @param destRect
102        Rectangle into which to copy the bitmap data. This rectangle
103        is subject to both view and render transformation, before
104        being applied. Thus, on screen, it does not necessarily
105        resemble a rectangle any more. The rectangle must be
106        non-empty, see
107        <type scope="::com::sun::star::geometry">RealRectangle2D</type>
108        for details.
109
110        @param destViewState
111        The view state to apply to the destination of this copy
112        operation. The view transformation must be non-singular.
113
114        @param destRenderState
115
116        The render state to apply to the destination of this copy
117        operation. The render transformation must be non-singular, and
118        the compositing mode must be one of the
119        <type>CompositingOperation</type> values.
120
121        @throws <type>com::sun::star::lang::IllegalArgumentException</type>
122        if one of the parameters are not within the specified range.
123     */
124    void copyRect( [in] XBitmapCanvas sourceCanvas,
125                   [in] ::com::sun::star::geometry::RealRectangle2D sourceRect, [in] ViewState sourceViewState, [in] RenderState sourceRenderState,
126                   [in] ::com::sun::star::geometry::RealRectangle2D destRect, [in] ViewState destViewState, [in] RenderState destRenderState )
127        raises (com::sun::star::lang::IllegalArgumentException,
128                VolatileContentDestroyedException);
129
130};
131
132//=============================================================================
133
134// TODO: Multiple-inheritance interfaces
135
136/** This service provides the interfaces for a <type>XBitmapCanvas</type>
137 */
138service BitmapCanvas
139{
140    /** Canvas interface, to issue rendering operations.
141     */
142    interface XBitmapCanvas;
143
144    /** Bitmap interface, to directly manipulate the pixel.
145     */
146    interface XBitmap;
147};
148
149}; }; }; };
150
151#endif
152