xref: /aoo41x/main/canvas/source/vcl/sprite.hxx (revision 91c99ff4)
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 #ifndef INCLUDED_VCLCANVAS_SPRITE_HXX
25 #define INCLUDED_VCLCANVAS_SPRITE_HXX
26 
27 #include <canvas/base/sprite.hxx>
28 
29 class OutputDevice;
30 
31 namespace vclcanvas
32 {
33     /** Specialization of ::canvas::Sprite interface, to also provide
34         redraw methods.
35      */
36     class Sprite : public ::canvas::Sprite
37     {
38     public:
39 
40         /** Redraw sprite at the stored position.
41 
42             @param bBufferedUpdate
43             When true, the redraw does <em>not</em> happen directly on
44             the front buffer, but within a VDev. Used to speed up
45             drawing.
46          */
47         virtual void redraw( OutputDevice& rOutDev,
48                              bool          bBufferedUpdate ) const = 0;
49 
50         /** Redraw sprite at the given position.
51 
52         	@param rPos
53             Output position of the sprite. Overrides the sprite's own
54             output position.
55 
56             @param bBufferedUpdate
57             When true, the redraw does <em>not</em> happen directly on
58             the front buffer, but within a VDev. Used to speed up
59             drawing.
60          */
61         virtual void redraw( OutputDevice&              rOutDev,
62                              const ::basegfx::B2DPoint& rPos,
63                              bool                       bBufferedUpdate ) const = 0;
64     };
65 }
66 
67 #endif /* INCLUDED_VCLCANVAS_SPRITE_HXX */
68