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