1*d1766043SAndrew Rist/**************************************************************
2*d1766043SAndrew Rist *
3*d1766043SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4*d1766043SAndrew Rist * or more contributor license agreements.  See the NOTICE file
5*d1766043SAndrew Rist * distributed with this work for additional information
6*d1766043SAndrew Rist * regarding copyright ownership.  The ASF licenses this file
7*d1766043SAndrew Rist * to you under the Apache License, Version 2.0 (the
8*d1766043SAndrew Rist * "License"); you may not use this file except in compliance
9*d1766043SAndrew Rist * with the License.  You may obtain a copy of the License at
10*d1766043SAndrew Rist *
11*d1766043SAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
12*d1766043SAndrew Rist *
13*d1766043SAndrew Rist * Unless required by applicable law or agreed to in writing,
14*d1766043SAndrew Rist * software distributed under the License is distributed on an
15*d1766043SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*d1766043SAndrew Rist * KIND, either express or implied.  See the License for the
17*d1766043SAndrew Rist * specific language governing permissions and limitations
18*d1766043SAndrew Rist * under the License.
19*d1766043SAndrew Rist *
20*d1766043SAndrew Rist *************************************************************/
21*d1766043SAndrew Rist
22*d1766043SAndrew Rist
23cdf0e10cSrcweir#ifndef __com_sun_star_rendering_XBitmapCanvas_idl__
24cdf0e10cSrcweir#define __com_sun_star_rendering_XBitmapCanvas_idl__
25cdf0e10cSrcweir
26cdf0e10cSrcweir#ifndef __com_sun_star_uno_XInterface_idl__
27cdf0e10cSrcweir#include <com/sun/star/uno/XInterface.idl>
28cdf0e10cSrcweir#endif
29cdf0e10cSrcweir#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
30cdf0e10cSrcweir#include <com/sun/star/lang/IllegalArgumentException.idl>
31cdf0e10cSrcweir#endif
32cdf0e10cSrcweir#ifndef __com_sun_star_geometry_RealRectangle2D_idl__
33cdf0e10cSrcweir#include <com/sun/star/geometry/RealRectangle2D.idl>
34cdf0e10cSrcweir#endif
35cdf0e10cSrcweir#ifndef __com_sun_star_rendering_RenderState_idl__
36cdf0e10cSrcweir#include <com/sun/star/rendering/RenderState.idl>
37cdf0e10cSrcweir#endif
38cdf0e10cSrcweir#ifndef __com_sun_star_rendering_XBitmap_idl__
39cdf0e10cSrcweir#include <com/sun/star/rendering/XBitmap.idl>
40cdf0e10cSrcweir#endif
41cdf0e10cSrcweir#ifndef __com_sun_star_rendering_XCanvas_idl__
42cdf0e10cSrcweir#include <com/sun/star/rendering/XCanvas.idl>
43cdf0e10cSrcweir#endif
44cdf0e10cSrcweir#ifndef __com_sun_star_rendering_VolatileContentDestroyedException_idl__
45cdf0e10cSrcweir#include <com/sun/star/rendering/VolatileContentDestroyedException.idl>
46cdf0e10cSrcweir#endif
47cdf0e10cSrcweir
48cdf0e10cSrcweir
49cdf0e10cSrcweirmodule com { module sun { module star { module rendering {
50cdf0e10cSrcweir
51cdf0e10cSrcweir/** This is a specialization of the canvas interface for bitmapped
52cdf0e10cSrcweir    canvases.<p>
53cdf0e10cSrcweir
54cdf0e10cSrcweir    This interface is a specialization of the canvas interface for
55cdf0e10cSrcweir    bitmapped canvases, where additional methods for accessing and
56cdf0e10cSrcweir    moving of bitmap content are provided.<p>
57cdf0e10cSrcweir
58cdf0e10cSrcweir    @since OOo 2.0
59cdf0e10cSrcweir */
60cdf0e10cSrcweirpublished interface XBitmapCanvas : XCanvas
61cdf0e10cSrcweir{
62cdf0e10cSrcweir    /** This method copies a rectangular area from a place of one
63cdf0e10cSrcweir        canvas to a place on another.<p>
64cdf0e10cSrcweir
65cdf0e10cSrcweir        This method copies a rectangular area from a place of one
66cdf0e10cSrcweir        canvas to a place on another. Source and destination areas are
67cdf0e10cSrcweir        permitted to overlap. If the source view or render state has a
68cdf0e10cSrcweir        clipping set, the regions clipped away from the source
69cdf0e10cSrcweir        rectangle are regarded fully transparent for the copy
70cdf0e10cSrcweir        operation. The device color for both source and destination
71cdf0e10cSrcweir        render state is ignored, the compositing mode only for the
72cdf0e10cSrcweir        source render state.<p>
73cdf0e10cSrcweir
74cdf0e10cSrcweir        @param sourceCanvas
75cdf0e10cSrcweir        Canvas from which to copy the bitmap data. Can be identical to
76cdf0e10cSrcweir        the canvas this method is called on, but must be valid.
77cdf0e10cSrcweir
78cdf0e10cSrcweir        @param sourceRect
79cdf0e10cSrcweir        Rectangle from which to copy the bitmap data. This rectangle
80cdf0e10cSrcweir        is subject to both view and render transformation, before
81cdf0e10cSrcweir        being applied. Thus, on screen, it does not necessarily
82cdf0e10cSrcweir        resemble a rectangle any more. The rectangle must be
83cdf0e10cSrcweir        non-empty, see
84cdf0e10cSrcweir        <type scope="::com::sun::star::geometry">RealRectangle2D</type>
85cdf0e10cSrcweir        for details.
86cdf0e10cSrcweir
87cdf0e10cSrcweir        @param sourceViewState
88cdf0e10cSrcweir        The view state to apply to the source of this copy
89cdf0e10cSrcweir        operation. The view transformation must be non-singular.
90cdf0e10cSrcweir
91cdf0e10cSrcweir        @param sourceRenderState
92cdf0e10cSrcweir        The render state to apply to the source of this copy
93cdf0e10cSrcweir        operation. The render transformation must be non-singular, and
94cdf0e10cSrcweir        the compositing mode must be one of the
95cdf0e10cSrcweir        <type>CompositingOperation</type> values.
96cdf0e10cSrcweir
97cdf0e10cSrcweir        @param destRect
98cdf0e10cSrcweir        Rectangle into which to copy the bitmap data. This rectangle
99cdf0e10cSrcweir        is subject to both view and render transformation, before
100cdf0e10cSrcweir        being applied. Thus, on screen, it does not necessarily
101cdf0e10cSrcweir        resemble a rectangle any more. The rectangle must be
102cdf0e10cSrcweir        non-empty, see
103cdf0e10cSrcweir        <type scope="::com::sun::star::geometry">RealRectangle2D</type>
104cdf0e10cSrcweir        for details.
105cdf0e10cSrcweir
106cdf0e10cSrcweir        @param destViewState
107cdf0e10cSrcweir        The view state to apply to the destination of this copy
108cdf0e10cSrcweir        operation. The view transformation must be non-singular.
109cdf0e10cSrcweir
110cdf0e10cSrcweir        @param destRenderState
111cdf0e10cSrcweir
112cdf0e10cSrcweir        The render state to apply to the destination of this copy
113cdf0e10cSrcweir        operation. The render transformation must be non-singular, and
114cdf0e10cSrcweir        the compositing mode must be one of the
115cdf0e10cSrcweir        <type>CompositingOperation</type> values.
116cdf0e10cSrcweir
117cdf0e10cSrcweir        @throws <type>com::sun::star::lang::IllegalArgumentException</type>
118cdf0e10cSrcweir        if one of the parameters are not within the specified range.
119cdf0e10cSrcweir     */
120cdf0e10cSrcweir    void copyRect( [in] XBitmapCanvas sourceCanvas,
121cdf0e10cSrcweir                   [in] ::com::sun::star::geometry::RealRectangle2D sourceRect, [in] ViewState sourceViewState, [in] RenderState sourceRenderState,
122cdf0e10cSrcweir                   [in] ::com::sun::star::geometry::RealRectangle2D destRect, [in] ViewState destViewState, [in] RenderState destRenderState )
123cdf0e10cSrcweir        raises (com::sun::star::lang::IllegalArgumentException,
124cdf0e10cSrcweir                VolatileContentDestroyedException);
125cdf0e10cSrcweir
126cdf0e10cSrcweir};
127cdf0e10cSrcweir
128cdf0e10cSrcweir//=============================================================================
129cdf0e10cSrcweir
130cdf0e10cSrcweir// TODO: Multiple-inheritance interfaces
131cdf0e10cSrcweir
132cdf0e10cSrcweir/** This service provides the interfaces for a <type>XBitmapCanvas</type>
133cdf0e10cSrcweir */
134cdf0e10cSrcweirservice BitmapCanvas
135cdf0e10cSrcweir{
136cdf0e10cSrcweir    /** Canvas interface, to issue rendering operations.
137cdf0e10cSrcweir     */
138cdf0e10cSrcweir    interface XBitmapCanvas;
139cdf0e10cSrcweir
140cdf0e10cSrcweir    /** Bitmap interface, to directly manipulate the pixel.
141cdf0e10cSrcweir     */
142cdf0e10cSrcweir    interface XBitmap;
143cdf0e10cSrcweir};
144cdf0e10cSrcweir
145cdf0e10cSrcweir}; }; }; };
146cdf0e10cSrcweir
147cdf0e10cSrcweir#endif
148