1c45d927aSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3c45d927aSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4c45d927aSAndrew Rist * or more contributor license agreements. See the NOTICE file 5c45d927aSAndrew Rist * distributed with this work for additional information 6c45d927aSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7c45d927aSAndrew Rist * to you under the Apache License, Version 2.0 (the 8c45d927aSAndrew Rist * "License"); you may not use this file except in compliance 9c45d927aSAndrew Rist * with the License. You may obtain a copy of the License at 10c45d927aSAndrew Rist * 11c45d927aSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12c45d927aSAndrew Rist * 13c45d927aSAndrew Rist * Unless required by applicable law or agreed to in writing, 14c45d927aSAndrew Rist * software distributed under the License is distributed on an 15c45d927aSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16c45d927aSAndrew Rist * KIND, either express or implied. See the License for the 17c45d927aSAndrew Rist * specific language governing permissions and limitations 18c45d927aSAndrew Rist * under the License. 19c45d927aSAndrew Rist * 20c45d927aSAndrew Rist *************************************************************/ 21c45d927aSAndrew Rist 22c45d927aSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef SD_PRESENTER_PRESENTER_CANVAS_HXX 25cdf0e10cSrcweir #define SD_PRESENTER_PRESENTER_CANVAS_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include "CanvasUpdateRequester.hxx" 28cdf0e10cSrcweir #include <basegfx/range/b2drectangle.hxx> 29cdf0e10cSrcweir #include <com/sun/star/awt/Point.hpp> 30cdf0e10cSrcweir #include <com/sun/star/awt/XWindow.hpp> 31cdf0e10cSrcweir #include <com/sun/star/awt/XWindowListener.hpp> 32cdf0e10cSrcweir #include <com/sun/star/geometry/AffineMatrix2D.hpp> 33cdf0e10cSrcweir #include <com/sun/star/lang/XInitialization.hpp> 34cdf0e10cSrcweir #include <com/sun/star/lang/IllegalArgumentException.hpp> 35cdf0e10cSrcweir #include <com/sun/star/rendering/XSpriteCanvas.hpp> 36cdf0e10cSrcweir #include <com/sun/star/rendering/VolatileContentDestroyedException.hpp> 37cdf0e10cSrcweir #include <cppuhelper/basemutex.hxx> 38cdf0e10cSrcweir #include <cppuhelper/compbase4.hxx> 39cdf0e10cSrcweir #include <boost/noncopyable.hpp> 40cdf0e10cSrcweir #include <boost/shared_ptr.hpp> 41cdf0e10cSrcweir 42cdf0e10cSrcweir namespace css = ::com::sun::star; 43cdf0e10cSrcweir 44cdf0e10cSrcweir namespace sd { namespace presenter { 45cdf0e10cSrcweir 46cdf0e10cSrcweir namespace { 47cdf0e10cSrcweir typedef ::cppu::WeakComponentImplHelper4 < 48cdf0e10cSrcweir css::rendering::XSpriteCanvas, 49cdf0e10cSrcweir css::rendering::XBitmap, 50cdf0e10cSrcweir css::awt::XWindowListener, 51cdf0e10cSrcweir css::lang::XInitialization 52cdf0e10cSrcweir > PresenterCanvasInterfaceBase; 53cdf0e10cSrcweir } 54cdf0e10cSrcweir 55cdf0e10cSrcweir /** Wrapper around a shared canvas that forwards most of its methods to the 56cdf0e10cSrcweir shared canvas. Most notable differences are: 57cdf0e10cSrcweir 1. The transformation of the ViewState of forwarded calls is modified by adding 58cdf0e10cSrcweir an offset. 59cdf0e10cSrcweir 2. The clip polygon of the ViewState of forwarded calls is intersected 60cdf0e10cSrcweir with a clip rectangle that can be set via SetClip(). 61cdf0e10cSrcweir 3. Calls to updateScreen() are collected. One call to the updateScreen() 62cdf0e10cSrcweir method of the shared canvas is made asynchronously. 63cdf0e10cSrcweir 64cdf0e10cSrcweir The canvas can use different canvases for sharing and for sprite 65cdf0e10cSrcweir construction. This allows the shared canvas to be a canvas of sprite itself. 66cdf0e10cSrcweir */ 67cdf0e10cSrcweir class PresenterCanvas 68cdf0e10cSrcweir : private ::boost::noncopyable, 69cdf0e10cSrcweir private ::cppu::BaseMutex, 70cdf0e10cSrcweir public PresenterCanvasInterfaceBase 71cdf0e10cSrcweir { 72cdf0e10cSrcweir public: 73cdf0e10cSrcweir /** This constructor is used when a PresenterCanvas object is created as 74cdf0e10cSrcweir a service. 75cdf0e10cSrcweir */ 76cdf0e10cSrcweir PresenterCanvas (void); 77cdf0e10cSrcweir 78cdf0e10cSrcweir /** This constructor is used when a PresenterCanvas object is created 79cdf0e10cSrcweir directly, typically by the PresenterCanvasFactory. 80cdf0e10cSrcweir @param rxUpdateCanvas 81cdf0e10cSrcweir This canvas is used to call updateScreen() at and to create 82cdf0e10cSrcweir sprites. In the typical case this canvas is identical to the 83cdf0e10cSrcweir rxSharedCanvas argument. 84cdf0e10cSrcweir @param rxUpdateWindow 85cdf0e10cSrcweir The window that belongs to the canvas given by the 86cdf0e10cSrcweir rxUpdateCanvas argument. 87cdf0e10cSrcweir @param rxSharedCanvas 88cdf0e10cSrcweir The canvas that is wrapped by the new instance of this class. 89cdf0e10cSrcweir Typically this is a regular XSpriteCanvas and then is identical 90cdf0e10cSrcweir to the one given by the rxUpdateCanvas argument. It may be the 91cdf0e10cSrcweir canvas of a sprite which does not support the XSpriteCanvas 92cdf0e10cSrcweir interface. In that case the canvas that created the sprite can 93cdf0e10cSrcweir be given as rxUpdateCanvas argument to allow to create further 94cdf0e10cSrcweir sprites and to have proper calls to updateScreen(). 95cdf0e10cSrcweir @param rxSharedWindow 96cdf0e10cSrcweir The window that belongs to the canvas given by the 97cdf0e10cSrcweir rxSharedCanvas argument. 98cdf0e10cSrcweir @param rxWindow 99cdf0e10cSrcweir The window that is represented by the new PresenterCanvas 100*86e1cf34SPedro Giffuni object. It is expected to be a direct descendant of 101cdf0e10cSrcweir rxSharedWindow. Its position inside rxSharedWindow defines the 102cdf0e10cSrcweir offset of the canvas implemented by the new PresenterCanvas 103cdf0e10cSrcweir object and rxSharedCanvas. 104cdf0e10cSrcweir */ 105cdf0e10cSrcweir PresenterCanvas ( 106cdf0e10cSrcweir const css::uno::Reference<css::rendering::XSpriteCanvas>& rxUpdateCanvas, 107cdf0e10cSrcweir const css::uno::Reference<css::awt::XWindow>& rxUpdateWindow, 108cdf0e10cSrcweir const css::uno::Reference<css::rendering::XCanvas>& rxSharedCanvas, 109cdf0e10cSrcweir const css::uno::Reference<css::awt::XWindow>& rxSharedWindow, 110cdf0e10cSrcweir const css::uno::Reference<css::awt::XWindow>& rxWindow); 111cdf0e10cSrcweir virtual ~PresenterCanvas (void); 112cdf0e10cSrcweir 113cdf0e10cSrcweir virtual void SAL_CALL disposing (void) 114cdf0e10cSrcweir throw (css::uno::RuntimeException); 115cdf0e10cSrcweir 116cdf0e10cSrcweir css::awt::Point GetOffset (const css::uno::Reference<css::awt::XWindow>& rxBaseWindow); 117cdf0e10cSrcweir 118cdf0e10cSrcweir /** Merge the given view state with the view state that translates the 119cdf0e10cSrcweir (virtual) child canvas to the shared canvas. 120cdf0e10cSrcweir */ 121cdf0e10cSrcweir css::rendering::ViewState MergeViewState ( 122cdf0e10cSrcweir const css::rendering::ViewState& rViewState, 123cdf0e10cSrcweir const css::awt::Point& raOffset); 124cdf0e10cSrcweir 125cdf0e10cSrcweir css::uno::Reference<css::rendering::XCanvas> GetSharedCanvas (void) const; 126cdf0e10cSrcweir 127cdf0e10cSrcweir /** This method is typically called by CanvasPane objects to set the 128cdf0e10cSrcweir repaint rectangle of a windowPaint() call as clip rectangle. When 129cdf0e10cSrcweir no or an empty rectangle is given then the window bounds are used 130cdf0e10cSrcweir instead. 131cdf0e10cSrcweir @param rClipRectangle 132cdf0e10cSrcweir A valid rectangle is used to clip the view state clip polygon. 133cdf0e10cSrcweir When an empty rectangle is given then the view state clip 134cdf0e10cSrcweir polygons are clipped against the window bounds. 135cdf0e10cSrcweir */ 136cdf0e10cSrcweir void SetClip (const css::awt::Rectangle& rClipRectangle); 137cdf0e10cSrcweir 138cdf0e10cSrcweir /** Called by custom sprites to update their clip polygon so that they 139cdf0e10cSrcweir are clipped at the borders of the canvas. This method has to be 140cdf0e10cSrcweir called after each change of the sprite location so that the bounds 141cdf0e10cSrcweir of the canvas can be transformed into the coordinate system of the 142cdf0e10cSrcweir sprite. 143cdf0e10cSrcweir */ 144cdf0e10cSrcweir css::uno::Reference<css::rendering::XPolyPolygon2D> UpdateSpriteClip ( 145cdf0e10cSrcweir const css::uno::Reference<css::rendering::XPolyPolygon2D>& rxOriginalClip, 146cdf0e10cSrcweir const css::geometry::RealPoint2D& rLocation, 147cdf0e10cSrcweir const css::geometry::RealSize2D& rSize); 148cdf0e10cSrcweir 149cdf0e10cSrcweir 150cdf0e10cSrcweir // XInitialization 151cdf0e10cSrcweir 152cdf0e10cSrcweir virtual void SAL_CALL initialize ( 153cdf0e10cSrcweir const css::uno::Sequence<css::uno::Any>& rArguments) 154cdf0e10cSrcweir throw(css::uno::Exception, css::uno::RuntimeException); 155cdf0e10cSrcweir 156cdf0e10cSrcweir 157cdf0e10cSrcweir // XCanvas 158cdf0e10cSrcweir 159cdf0e10cSrcweir virtual void SAL_CALL clear (void) 160cdf0e10cSrcweir throw (css::uno::RuntimeException); 161cdf0e10cSrcweir 162cdf0e10cSrcweir virtual void SAL_CALL drawPoint ( 163cdf0e10cSrcweir const css::geometry::RealPoint2D& aPoint, 164cdf0e10cSrcweir const css::rendering::ViewState& aViewState, 165cdf0e10cSrcweir const css::rendering::RenderState& aRenderState) 166cdf0e10cSrcweir throw (css::lang::IllegalArgumentException, css::uno::RuntimeException); 167cdf0e10cSrcweir 168cdf0e10cSrcweir virtual void SAL_CALL drawLine ( 169cdf0e10cSrcweir const css::geometry::RealPoint2D& aStartPoint, 170cdf0e10cSrcweir const css::geometry::RealPoint2D& aEndPoint, 171cdf0e10cSrcweir const css::rendering::ViewState& aViewState, 172cdf0e10cSrcweir const css::rendering::RenderState& aRenderState) 173cdf0e10cSrcweir throw (css::lang::IllegalArgumentException, css::uno::RuntimeException); 174cdf0e10cSrcweir 175cdf0e10cSrcweir virtual void SAL_CALL drawBezier ( 176cdf0e10cSrcweir const css::geometry::RealBezierSegment2D& aBezierSegment, 177cdf0e10cSrcweir const css::geometry::RealPoint2D& aEndPoint, 178cdf0e10cSrcweir const css::rendering::ViewState& aViewState, 179cdf0e10cSrcweir const css::rendering::RenderState& aRenderState) 180cdf0e10cSrcweir throw (css::lang::IllegalArgumentException, css::uno::RuntimeException); 181cdf0e10cSrcweir 182cdf0e10cSrcweir virtual css::uno::Reference<css::rendering::XCachedPrimitive> SAL_CALL drawPolyPolygon ( 183cdf0e10cSrcweir const css::uno::Reference< css::rendering::XPolyPolygon2D >& xPolyPolygon, 184cdf0e10cSrcweir const css::rendering::ViewState& aViewState, 185cdf0e10cSrcweir const css::rendering::RenderState& aRenderState) 186cdf0e10cSrcweir throw (css::lang::IllegalArgumentException, css::uno::RuntimeException); 187cdf0e10cSrcweir 188cdf0e10cSrcweir virtual css::uno::Reference<css::rendering::XCachedPrimitive> SAL_CALL strokePolyPolygon ( 189cdf0e10cSrcweir const css::uno::Reference< css::rendering::XPolyPolygon2D >& xPolyPolygon, 190cdf0e10cSrcweir const css::rendering::ViewState& aViewState, 191cdf0e10cSrcweir const css::rendering::RenderState& aRenderState, 192cdf0e10cSrcweir const css::rendering::StrokeAttributes& aStrokeAttributes) 193cdf0e10cSrcweir throw (css::lang::IllegalArgumentException, css::uno::RuntimeException); 194cdf0e10cSrcweir 195cdf0e10cSrcweir virtual css::uno::Reference<css::rendering::XCachedPrimitive> SAL_CALL 196cdf0e10cSrcweir strokeTexturedPolyPolygon ( 197cdf0e10cSrcweir const css::uno::Reference< css::rendering::XPolyPolygon2D >& xPolyPolygon, 198cdf0e10cSrcweir const css::rendering::ViewState& aViewState, 199cdf0e10cSrcweir const css::rendering::RenderState& aRenderState, 200cdf0e10cSrcweir const css::uno::Sequence< css::rendering::Texture >& aTextures, 201cdf0e10cSrcweir const css::rendering::StrokeAttributes& aStrokeAttributes) 202cdf0e10cSrcweir throw (css::lang::IllegalArgumentException, 203cdf0e10cSrcweir css::rendering::VolatileContentDestroyedException, 204cdf0e10cSrcweir css::uno::RuntimeException); 205cdf0e10cSrcweir 206cdf0e10cSrcweir virtual css::uno::Reference<css::rendering::XCachedPrimitive> SAL_CALL 207cdf0e10cSrcweir strokeTextureMappedPolyPolygon( 208cdf0e10cSrcweir const css::uno::Reference<css::rendering::XPolyPolygon2D >& xPolyPolygon, 209cdf0e10cSrcweir const css::rendering::ViewState& aViewState, 210cdf0e10cSrcweir const css::rendering::RenderState& aRenderState, 211cdf0e10cSrcweir const css::uno::Sequence<css::rendering::Texture>& aTextures, 212cdf0e10cSrcweir const css::uno::Reference<css::geometry::XMapping2D>& xMapping, 213cdf0e10cSrcweir const css::rendering::StrokeAttributes& aStrokeAttributes) 214cdf0e10cSrcweir throw (css::lang::IllegalArgumentException, 215cdf0e10cSrcweir css::rendering::VolatileContentDestroyedException, 216cdf0e10cSrcweir css::uno::RuntimeException); 217cdf0e10cSrcweir 218cdf0e10cSrcweir virtual css::uno::Reference<css::rendering::XPolyPolygon2D> SAL_CALL 219cdf0e10cSrcweir queryStrokeShapes( 220cdf0e10cSrcweir const css::uno::Reference<css::rendering::XPolyPolygon2D>& xPolyPolygon, 221cdf0e10cSrcweir const css::rendering::ViewState& aViewState, 222cdf0e10cSrcweir const css::rendering::RenderState& aRenderState, 223cdf0e10cSrcweir const css::rendering::StrokeAttributes& aStrokeAttributes) 224cdf0e10cSrcweir throw (css::lang::IllegalArgumentException, css::uno::RuntimeException); 225cdf0e10cSrcweir 226cdf0e10cSrcweir virtual css::uno::Reference<css::rendering::XCachedPrimitive> SAL_CALL 227cdf0e10cSrcweir fillPolyPolygon( 228cdf0e10cSrcweir const css::uno::Reference<css::rendering::XPolyPolygon2D>& xPolyPolygon, 229cdf0e10cSrcweir const css::rendering::ViewState& aViewState, 230cdf0e10cSrcweir const css::rendering::RenderState& aRenderState) 231cdf0e10cSrcweir throw (css::lang::IllegalArgumentException, 232cdf0e10cSrcweir css::uno::RuntimeException); 233cdf0e10cSrcweir 234cdf0e10cSrcweir virtual css::uno::Reference<css::rendering::XCachedPrimitive> SAL_CALL 235cdf0e10cSrcweir fillTexturedPolyPolygon( 236cdf0e10cSrcweir const css::uno::Reference<css::rendering::XPolyPolygon2D>& xPolyPolygon, 237cdf0e10cSrcweir const css::rendering::ViewState& aViewState, 238cdf0e10cSrcweir const css::rendering::RenderState& aRenderState, 239cdf0e10cSrcweir const css::uno::Sequence<css::rendering::Texture>& xTextures) 240cdf0e10cSrcweir throw (css::lang::IllegalArgumentException, 241cdf0e10cSrcweir css::rendering::VolatileContentDestroyedException, 242cdf0e10cSrcweir css::uno::RuntimeException); 243cdf0e10cSrcweir 244cdf0e10cSrcweir virtual css::uno::Reference<css::rendering::XCachedPrimitive> SAL_CALL 245cdf0e10cSrcweir fillTextureMappedPolyPolygon( 246cdf0e10cSrcweir const css::uno::Reference< css::rendering::XPolyPolygon2D >& xPolyPolygon, 247cdf0e10cSrcweir const css::rendering::ViewState& aViewState, 248cdf0e10cSrcweir const css::rendering::RenderState& aRenderState, 249cdf0e10cSrcweir const css::uno::Sequence< css::rendering::Texture >& xTextures, 250cdf0e10cSrcweir const css::uno::Reference< css::geometry::XMapping2D >& xMapping) 251cdf0e10cSrcweir throw (css::lang::IllegalArgumentException, 252cdf0e10cSrcweir css::rendering::VolatileContentDestroyedException, 253cdf0e10cSrcweir css::uno::RuntimeException); 254cdf0e10cSrcweir 255cdf0e10cSrcweir virtual css::uno::Reference<css::rendering::XCanvasFont> SAL_CALL 256cdf0e10cSrcweir createFont( 257cdf0e10cSrcweir const css::rendering::FontRequest& aFontRequest, 258cdf0e10cSrcweir const css::uno::Sequence< css::beans::PropertyValue >& aExtraFontProperties, 259cdf0e10cSrcweir const css::geometry::Matrix2D& aFontMatrix) 260cdf0e10cSrcweir throw (css::lang::IllegalArgumentException, 261cdf0e10cSrcweir css::uno::RuntimeException); 262cdf0e10cSrcweir 263cdf0e10cSrcweir virtual css::uno::Sequence<css::rendering::FontInfo> SAL_CALL 264cdf0e10cSrcweir queryAvailableFonts( 265cdf0e10cSrcweir const css::rendering::FontInfo& aFilter, 266cdf0e10cSrcweir const css::uno::Sequence< css::beans::PropertyValue >& aFontProperties) 267cdf0e10cSrcweir throw (css::lang::IllegalArgumentException, css::uno::RuntimeException); 268cdf0e10cSrcweir 269cdf0e10cSrcweir virtual css::uno::Reference<css::rendering::XCachedPrimitive> SAL_CALL 270cdf0e10cSrcweir drawText( 271cdf0e10cSrcweir const css::rendering::StringContext& aText, 272cdf0e10cSrcweir const css::uno::Reference< css::rendering::XCanvasFont >& xFont, 273cdf0e10cSrcweir const css::rendering::ViewState& aViewState, 274cdf0e10cSrcweir const css::rendering::RenderState& aRenderState, 275cdf0e10cSrcweir ::sal_Int8 nTextDirection) 276cdf0e10cSrcweir throw (css::lang::IllegalArgumentException, css::uno::RuntimeException); 277cdf0e10cSrcweir 278cdf0e10cSrcweir virtual css::uno::Reference<css::rendering::XCachedPrimitive> SAL_CALL 279cdf0e10cSrcweir drawTextLayout( 280cdf0e10cSrcweir const css::uno::Reference< css::rendering::XTextLayout >& xLayoutetText, 281cdf0e10cSrcweir const css::rendering::ViewState& aViewState, 282cdf0e10cSrcweir const css::rendering::RenderState& aRenderState) 283cdf0e10cSrcweir throw (css::lang::IllegalArgumentException, css::uno::RuntimeException); 284cdf0e10cSrcweir 285cdf0e10cSrcweir virtual css::uno::Reference<css::rendering::XCachedPrimitive> SAL_CALL 286cdf0e10cSrcweir drawBitmap( 287cdf0e10cSrcweir const css::uno::Reference< css::rendering::XBitmap >& xBitmap, 288cdf0e10cSrcweir const css::rendering::ViewState& aViewState, 289cdf0e10cSrcweir const css::rendering::RenderState& aRenderState) 290cdf0e10cSrcweir throw (css::lang::IllegalArgumentException, 291cdf0e10cSrcweir css::rendering::VolatileContentDestroyedException, 292cdf0e10cSrcweir css::uno::RuntimeException); 293cdf0e10cSrcweir 294cdf0e10cSrcweir virtual css::uno::Reference<css::rendering::XCachedPrimitive> SAL_CALL 295cdf0e10cSrcweir drawBitmapModulated( 296cdf0e10cSrcweir const css::uno::Reference< css::rendering::XBitmap>& xBitmap, 297cdf0e10cSrcweir const css::rendering::ViewState& aViewState, 298cdf0e10cSrcweir const css::rendering::RenderState& aRenderState) 299cdf0e10cSrcweir throw (css::lang::IllegalArgumentException, 300cdf0e10cSrcweir css::rendering::VolatileContentDestroyedException, 301cdf0e10cSrcweir css::uno::RuntimeException); 302cdf0e10cSrcweir 303cdf0e10cSrcweir virtual css::uno::Reference<css::rendering::XGraphicDevice> SAL_CALL 304cdf0e10cSrcweir getDevice (void) 305cdf0e10cSrcweir throw (css::uno::RuntimeException); 306cdf0e10cSrcweir 307cdf0e10cSrcweir 308cdf0e10cSrcweir // XBitmapCanvas 309cdf0e10cSrcweir 310cdf0e10cSrcweir void SAL_CALL copyRect( 311cdf0e10cSrcweir const css::uno::Reference< css::rendering::XBitmapCanvas >& sourceCanvas, 312cdf0e10cSrcweir const css::geometry::RealRectangle2D& sourceRect, 313cdf0e10cSrcweir const css::rendering::ViewState& sourceViewState, 314cdf0e10cSrcweir const css::rendering::RenderState& sourceRenderState, 315cdf0e10cSrcweir const css::geometry::RealRectangle2D& destRect, 316cdf0e10cSrcweir const css::rendering::ViewState& destViewState, 317cdf0e10cSrcweir const css::rendering::RenderState& destRenderState) 318cdf0e10cSrcweir throw (css::lang::IllegalArgumentException, 319cdf0e10cSrcweir css::rendering::VolatileContentDestroyedException, 320cdf0e10cSrcweir css::uno::RuntimeException); 321cdf0e10cSrcweir 322cdf0e10cSrcweir 323cdf0e10cSrcweir // XSpriteCanvas 324cdf0e10cSrcweir 325cdf0e10cSrcweir css::uno::Reference< css::rendering::XAnimatedSprite > SAL_CALL 326cdf0e10cSrcweir createSpriteFromAnimation ( 327cdf0e10cSrcweir const css::uno::Reference< css::rendering::XAnimation >& animation) 328cdf0e10cSrcweir throw (css::lang::IllegalArgumentException, css::uno::RuntimeException); 329cdf0e10cSrcweir 330cdf0e10cSrcweir css::uno::Reference< css::rendering::XAnimatedSprite > SAL_CALL 331cdf0e10cSrcweir createSpriteFromBitmaps ( 332cdf0e10cSrcweir const css::uno::Sequence< 333cdf0e10cSrcweir css::uno::Reference< css::rendering::XBitmap > >& animationBitmaps, 334cdf0e10cSrcweir ::sal_Int8 interpolationMode) 335cdf0e10cSrcweir throw (css::lang::IllegalArgumentException, 336cdf0e10cSrcweir css::rendering::VolatileContentDestroyedException, 337cdf0e10cSrcweir css::uno::RuntimeException); 338cdf0e10cSrcweir 339cdf0e10cSrcweir css::uno::Reference< css::rendering::XCustomSprite > SAL_CALL 340cdf0e10cSrcweir createCustomSprite ( 341cdf0e10cSrcweir const css::geometry::RealSize2D& spriteSize) 342cdf0e10cSrcweir throw (css::lang::IllegalArgumentException, css::uno::RuntimeException); 343cdf0e10cSrcweir 344cdf0e10cSrcweir css::uno::Reference< css::rendering::XSprite > SAL_CALL 345cdf0e10cSrcweir createClonedSprite ( 346cdf0e10cSrcweir const css::uno::Reference< css::rendering::XSprite >& original) 347cdf0e10cSrcweir throw (css::lang::IllegalArgumentException, css::uno::RuntimeException); 348cdf0e10cSrcweir 349cdf0e10cSrcweir ::sal_Bool SAL_CALL updateScreen (::sal_Bool bUpdateAll) 350cdf0e10cSrcweir throw (css::uno::RuntimeException); 351cdf0e10cSrcweir 352cdf0e10cSrcweir 353cdf0e10cSrcweir // XEventListener 354cdf0e10cSrcweir 355cdf0e10cSrcweir virtual void SAL_CALL disposing (const css::lang::EventObject& rEvent) 356cdf0e10cSrcweir throw (css::uno::RuntimeException); 357cdf0e10cSrcweir 358cdf0e10cSrcweir 359cdf0e10cSrcweir // XWindowListener 360cdf0e10cSrcweir 361cdf0e10cSrcweir virtual void SAL_CALL windowResized (const css::awt::WindowEvent& rEvent) 362cdf0e10cSrcweir throw (css::uno::RuntimeException); 363cdf0e10cSrcweir 364cdf0e10cSrcweir virtual void SAL_CALL windowMoved (const css::awt::WindowEvent& rEvent) 365cdf0e10cSrcweir throw (css::uno::RuntimeException); 366cdf0e10cSrcweir 367cdf0e10cSrcweir virtual void SAL_CALL windowShown (const css::lang::EventObject& rEvent) 368cdf0e10cSrcweir throw (css::uno::RuntimeException); 369cdf0e10cSrcweir 370cdf0e10cSrcweir virtual void SAL_CALL windowHidden (const css::lang::EventObject& rEvent) 371cdf0e10cSrcweir throw (css::uno::RuntimeException); 372cdf0e10cSrcweir 373cdf0e10cSrcweir 374cdf0e10cSrcweir // XBitmap 375cdf0e10cSrcweir 376cdf0e10cSrcweir virtual css::geometry::IntegerSize2D SAL_CALL getSize (void) 377cdf0e10cSrcweir throw (css::uno::RuntimeException); 378cdf0e10cSrcweir 379cdf0e10cSrcweir virtual sal_Bool SAL_CALL hasAlpha (void) 380cdf0e10cSrcweir throw (css::uno::RuntimeException); 381cdf0e10cSrcweir 382cdf0e10cSrcweir virtual css::uno::Reference<css::rendering::XBitmapCanvas> SAL_CALL queryBitmapCanvas (void) 383cdf0e10cSrcweir throw (css::uno::RuntimeException); 384cdf0e10cSrcweir 385cdf0e10cSrcweir virtual css::uno::Reference<css::rendering::XBitmap> SAL_CALL getScaledBitmap( 386cdf0e10cSrcweir const css::geometry::RealSize2D& rNewSize, 387cdf0e10cSrcweir sal_Bool bFast) 388cdf0e10cSrcweir throw (css::uno::RuntimeException, 389cdf0e10cSrcweir css::lang::IllegalArgumentException, 390cdf0e10cSrcweir css::rendering::VolatileContentDestroyedException); 391cdf0e10cSrcweir 392cdf0e10cSrcweir private: 393cdf0e10cSrcweir css::uno::Reference<css::rendering::XSpriteCanvas> mxUpdateCanvas; 394cdf0e10cSrcweir css::uno::Reference<css::awt::XWindow> mxUpdateWindow; 395cdf0e10cSrcweir css::uno::Reference<css::rendering::XCanvas> mxSharedCanvas; 396cdf0e10cSrcweir css::uno::Reference<css::awt::XWindow> mxSharedWindow; 397cdf0e10cSrcweir 398cdf0e10cSrcweir /** The window for which a canvas is emulated. 399cdf0e10cSrcweir */ 400cdf0e10cSrcweir css::uno::Reference<css::awt::XWindow> mxWindow; 401cdf0e10cSrcweir 402cdf0e10cSrcweir /** Offset of the emulated canvas with respect to the shared canvas. 403cdf0e10cSrcweir */ 404cdf0e10cSrcweir css::awt::Point maOffset; 405cdf0e10cSrcweir 406cdf0e10cSrcweir /** The UpdateRequester is used by updateScreen() to schedule 407cdf0e10cSrcweir updateScreen() calls at the shared canvas. 408cdf0e10cSrcweir */ 409cdf0e10cSrcweir ::boost::shared_ptr<CanvasUpdateRequester> mpUpdateRequester; 410cdf0e10cSrcweir 411cdf0e10cSrcweir /** The clip rectangle as given to SetClip(). 412cdf0e10cSrcweir */ 413cdf0e10cSrcweir css::awt::Rectangle maClipRectangle; 414cdf0e10cSrcweir 415cdf0e10cSrcweir /** When this flag is true (it is set to true after every call to 416cdf0e10cSrcweir updateScreen()) then the next call to MergeViewState updates the 417cdf0e10cSrcweir maOffset member. A possible optimization would set this flag only 418cdf0e10cSrcweir to true when one of the windows between mxWindow and mxSharedWindow 419cdf0e10cSrcweir changes its position. 420cdf0e10cSrcweir */ 421cdf0e10cSrcweir bool mbOffsetUpdatePending; 422cdf0e10cSrcweir 423cdf0e10cSrcweir ::basegfx::B2DRectangle GetClipRectangle ( 424cdf0e10cSrcweir const css::geometry::AffineMatrix2D& rViewTransform, 425cdf0e10cSrcweir const css::awt::Point& rOffset); 426cdf0e10cSrcweir 427cdf0e10cSrcweir css::rendering::ViewState MergeViewState (const css::rendering::ViewState& rViewState); 428cdf0e10cSrcweir 429cdf0e10cSrcweir /** This method throws a DisposedException when the object has already been 430cdf0e10cSrcweir disposed. 431cdf0e10cSrcweir */ 432cdf0e10cSrcweir void ThrowIfDisposed (void) 433cdf0e10cSrcweir throw (css::lang::DisposedException); 434cdf0e10cSrcweir }; 435cdf0e10cSrcweir 436cdf0e10cSrcweir 437cdf0e10cSrcweir 438cdf0e10cSrcweir } } // end of namespace ::sd::presenter 439cdf0e10cSrcweir 440cdf0e10cSrcweir #endif 441