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