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 24 // MARKER(update_precomp.py): autogen include statement, do not remove 25 #include "precompiled_canvas.hxx" 26 27 #include <canvas/debug.hxx> 28 #include <canvas/verbosetrace.hxx> 29 #include <canvas/canvastools.hxx> 30 31 #include <comphelper/scopeguard.hxx> 32 33 #include <basegfx/range/b2drectangle.hxx> 34 #include <basegfx/tools/canvastools.hxx> 35 36 #include <boost/cast.hpp> 37 38 #include "null_spritecanvashelper.hxx" 39 #include "null_canvascustomsprite.hxx" 40 41 42 using namespace ::com::sun::star; 43 44 namespace nullcanvas 45 { SpriteCanvasHelper()46 SpriteCanvasHelper::SpriteCanvasHelper() : 47 mpRedrawManager( NULL ) 48 { 49 } 50 init(::canvas::SpriteRedrawManager & rManager,SpriteCanvas & rDevice,const::basegfx::B2ISize & rSize,bool bHasAlpha)51 void SpriteCanvasHelper::init( ::canvas::SpriteRedrawManager& rManager, 52 SpriteCanvas& rDevice, 53 const ::basegfx::B2ISize& rSize, 54 bool bHasAlpha ) 55 { 56 mpRedrawManager = &rManager; 57 58 CanvasHelper::init( rSize, rDevice, bHasAlpha ); 59 } 60 disposing()61 void SpriteCanvasHelper::disposing() 62 { 63 mpRedrawManager = NULL; 64 65 // forward to base 66 CanvasHelper::disposing(); 67 } 68 createSpriteFromAnimation(const uno::Reference<rendering::XAnimation> &)69 uno::Reference< rendering::XAnimatedSprite > SpriteCanvasHelper::createSpriteFromAnimation( 70 const uno::Reference< rendering::XAnimation >& /*animation*/ ) 71 { 72 return uno::Reference< rendering::XAnimatedSprite >(); 73 } 74 createSpriteFromBitmaps(const uno::Sequence<uno::Reference<rendering::XBitmap>> &,sal_Int8)75 uno::Reference< rendering::XAnimatedSprite > SpriteCanvasHelper::createSpriteFromBitmaps( 76 const uno::Sequence< uno::Reference< rendering::XBitmap > >& /*animationBitmaps*/, 77 sal_Int8 /*interpolationMode*/ ) 78 { 79 return uno::Reference< rendering::XAnimatedSprite >(); 80 } 81 createCustomSprite(const geometry::RealSize2D & spriteSize)82 uno::Reference< rendering::XCustomSprite > SpriteCanvasHelper::createCustomSprite( const geometry::RealSize2D& spriteSize ) 83 { 84 if( !mpRedrawManager ) 85 return uno::Reference< rendering::XCustomSprite >(); // we're disposed 86 87 return uno::Reference< rendering::XCustomSprite >( 88 new CanvasCustomSprite( spriteSize, 89 mpDevice ) ); 90 } 91 createClonedSprite(const uno::Reference<rendering::XSprite> &)92 uno::Reference< rendering::XSprite > SpriteCanvasHelper::createClonedSprite( const uno::Reference< rendering::XSprite >& /*original*/ ) 93 { 94 return uno::Reference< rendering::XSprite >(); 95 } 96 updateScreen(const::basegfx::B2IRange &,sal_Bool,bool &)97 sal_Bool SpriteCanvasHelper::updateScreen( const ::basegfx::B2IRange& /*rCurrArea*/, 98 sal_Bool /*bUpdateAll*/, 99 bool& /*io_bSurfaceDirty*/ ) 100 { 101 // TODO 102 return sal_True; 103 } 104 backgroundPaint(const::basegfx::B2DRange &)105 void SpriteCanvasHelper::backgroundPaint( const ::basegfx::B2DRange& /*rUpdateRect*/ ) 106 { 107 // TODO 108 } 109 scrollUpdate(const::basegfx::B2DRange &,const::basegfx::B2DRange &,const::canvas::SpriteRedrawManager::UpdateArea &)110 void SpriteCanvasHelper::scrollUpdate( const ::basegfx::B2DRange& /*rMoveStart*/, 111 const ::basegfx::B2DRange& /*rMoveEnd*/, 112 const ::canvas::SpriteRedrawManager::UpdateArea& /*rUpdateArea*/ ) 113 { 114 // TODO 115 } 116 opaqueUpdate(const::canvas::SpriteRedrawManager::UpdateArea &)117 void SpriteCanvasHelper::opaqueUpdate( const ::canvas::SpriteRedrawManager::UpdateArea& /*rUpdateArea*/ ) 118 { 119 // TODO 120 } 121 genericUpdate(const::canvas::SpriteRedrawManager::UpdateArea &)122 void SpriteCanvasHelper::genericUpdate( const ::canvas::SpriteRedrawManager::UpdateArea& /*rUpdateArea*/ ) 123 { 124 // TODO 125 } 126 127 } 128