Branch data 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 : : #ifndef _NULLCANVAS_SPRITECANVASHELPER_HXX_
21 : : #define _NULLCANVAS_SPRITECANVASHELPER_HXX_
22 : :
23 : : #include <com/sun/star/rendering/XSpriteCanvas.hpp>
24 : : #include <com/sun/star/rendering/XIntegerBitmap.hpp>
25 : :
26 : : #include <canvas/spriteredrawmanager.hxx>
27 : :
28 : : #include "null_canvashelper.hxx"
29 : :
30 : : namespace basegfx
31 : : {
32 : : class B2IRange;
33 : : }
34 : :
35 : : namespace nullcanvas
36 : : {
37 : : class SpriteCanvas;
38 : :
39 : 0 : class SpriteCanvasHelper : public CanvasHelper
40 : : {
41 : : public:
42 : : SpriteCanvasHelper();
43 : :
44 : : void init( ::canvas::SpriteRedrawManager& rManager,
45 : : SpriteCanvas& rDevice,
46 : : const ::basegfx::B2ISize& rSize,
47 : : bool bHasAlpha );
48 : :
49 : : /// Dispose all internal references
50 : : void disposing();
51 : :
52 : : // XSpriteCanvas
53 : : ::com::sun::star::uno::Reference<
54 : : ::com::sun::star::rendering::XAnimatedSprite > createSpriteFromAnimation(
55 : : const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XAnimation >& animation );
56 : :
57 : : ::com::sun::star::uno::Reference<
58 : : ::com::sun::star::rendering::XAnimatedSprite > createSpriteFromBitmaps(
59 : : const ::com::sun::star::uno::Sequence<
60 : : ::com::sun::star::uno::Reference<
61 : : ::com::sun::star::rendering::XBitmap > >& animationBitmaps,
62 : : sal_Int8 interpolationMode );
63 : :
64 : : ::com::sun::star::uno::Reference<
65 : : ::com::sun::star::rendering::XCustomSprite > createCustomSprite(
66 : : const ::com::sun::star::geometry::RealSize2D& spriteSize );
67 : :
68 : : ::com::sun::star::uno::Reference<
69 : : ::com::sun::star::rendering::XSprite > createClonedSprite(
70 : : const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XSprite >& original );
71 : :
72 : : /** Actually perform the screen update
73 : :
74 : : @param rCurrArea
75 : : Current window area in absolute screen coordinates
76 : :
77 : : @param bUpdateAll
78 : : sal_True, if everything must be updated, not only changed
79 : : sprites
80 : :
81 : : @param io_bSurfaceDirty
82 : : In/out parameter, whether backbuffer surface is dirty (if
83 : : yes, we're performing a full update, anyway)
84 : : */
85 : : sal_Bool updateScreen( const ::basegfx::B2IRange& rCurrArea,
86 : : sal_Bool bUpdateAll,
87 : : bool& io_bSurfaceDirty );
88 : :
89 : : private:
90 : : /// Set from the SpriteCanvas: instance coordinating sprite redraw
91 : : ::canvas::SpriteRedrawManager* mpRedrawManager;
92 : : };
93 : : }
94 : :
95 : : #endif /* _NULLCANVAS_SPRITECANVASHELPER_HXX_ */
96 : :
97 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|