Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 :
20 :
21 : #include <canvas/debug.hxx>
22 : #include <canvas/verbosetrace.hxx>
23 : #include <canvas/canvastools.hxx>
24 :
25 : #include <comphelper/scopeguard.hxx>
26 :
27 : #include <basegfx/range/b2drectangle.hxx>
28 : #include <basegfx/tools/canvastools.hxx>
29 :
30 : #include <boost/cast.hpp>
31 :
32 : #include "null_spritecanvashelper.hxx"
33 : #include "null_canvascustomsprite.hxx"
34 :
35 :
36 : using namespace ::com::sun::star;
37 :
38 : namespace nullcanvas
39 : {
40 0 : SpriteCanvasHelper::SpriteCanvasHelper() :
41 0 : mpRedrawManager( NULL )
42 : {
43 0 : }
44 :
45 0 : void SpriteCanvasHelper::init( ::canvas::SpriteRedrawManager& rManager,
46 : SpriteCanvas& rDevice,
47 : const ::basegfx::B2ISize& rSize,
48 : bool bHasAlpha )
49 : {
50 0 : mpRedrawManager = &rManager;
51 :
52 0 : CanvasHelper::init( rSize, rDevice, bHasAlpha );
53 0 : }
54 :
55 0 : void SpriteCanvasHelper::disposing()
56 : {
57 0 : mpRedrawManager = NULL;
58 :
59 : // forward to base
60 0 : CanvasHelper::disposing();
61 0 : }
62 :
63 0 : uno::Reference< rendering::XAnimatedSprite > SpriteCanvasHelper::createSpriteFromAnimation(
64 : const uno::Reference< rendering::XAnimation >& /*animation*/ )
65 : {
66 0 : return uno::Reference< rendering::XAnimatedSprite >();
67 : }
68 :
69 0 : uno::Reference< rendering::XAnimatedSprite > SpriteCanvasHelper::createSpriteFromBitmaps(
70 : const uno::Sequence< uno::Reference< rendering::XBitmap > >& /*animationBitmaps*/,
71 : sal_Int8 /*interpolationMode*/ )
72 : {
73 0 : return uno::Reference< rendering::XAnimatedSprite >();
74 : }
75 :
76 0 : uno::Reference< rendering::XCustomSprite > SpriteCanvasHelper::createCustomSprite( const geometry::RealSize2D& spriteSize )
77 : {
78 0 : if( !mpRedrawManager )
79 0 : return uno::Reference< rendering::XCustomSprite >(); // we're disposed
80 :
81 : return uno::Reference< rendering::XCustomSprite >(
82 : new CanvasCustomSprite( spriteSize,
83 0 : mpDevice ) );
84 : }
85 :
86 0 : uno::Reference< rendering::XSprite > SpriteCanvasHelper::createClonedSprite( const uno::Reference< rendering::XSprite >& /*original*/ )
87 : {
88 0 : return uno::Reference< rendering::XSprite >();
89 : }
90 :
91 0 : sal_Bool SpriteCanvasHelper::updateScreen( const ::basegfx::B2IRange& /*rCurrArea*/,
92 : sal_Bool /*bUpdateAll*/,
93 : bool& /*io_bSurfaceDirty*/ )
94 : {
95 : // TODO
96 0 : return sal_True;
97 : }
98 0 : }
99 :
100 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|