summaryrefslogtreecommitdiff
path: root/canvas/source/vcl
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2005-11-02 12:03:59 +0000
committerKurt Zenker <kz@openoffice.org>2005-11-02 12:03:59 +0000
commit8d9949c7798774746e75e033448628ab96e7e543 (patch)
treed0a332597d50937b9e6e9c9a7002d727fde713f9 /canvas/source/vcl
parentf4d78a48b916eccc69d0e5ae9b7cada93492b1e9 (diff)
INTEGRATION: CWS canvas02 (1.5.2); FILE MERGED
2005/10/08 12:55:59 thb 1.5.2.4: RESYNC: (1.5-1.6); FILE MERGED 2005/09/22 21:00:53 thb 1.5.2.3: #i48939# Employing faster XOR masking for the special case nontransparent, non-alpha bitmap redraw in backbuffer (incidently, that matches the typical slide transition sprite update) 2005/07/21 14:52:49 thb 1.5.2.2: #i48939# Factored out round up/down to integer; removed backend specific methods from base Sprite interface; removed updateScreen overwrite from SpriteCanvasBase (too much backend specifics need to be passed to HW canvases); now passing the target OutputDevice directly via Sprite::redraw() method in VCL canvas; made XFont -> impl font conversion dynamic cast, too; removed the getSpriteTargetSurface crap from SpriteCanvas 2005/06/17 23:49:52 thb 1.5.2.1: #i48939# Huge refactoring of canvas; as much functionality as possible is now common in a bunch of shared base classes (input checking, locking, sprite redraw, etc.); added scroll update optimization, transparently to all canvas implementations
Diffstat (limited to 'canvas/source/vcl')
-rw-r--r--canvas/source/vcl/sprite.hxx80
1 files changed, 28 insertions, 52 deletions
diff --git a/canvas/source/vcl/sprite.hxx b/canvas/source/vcl/sprite.hxx
index 4ed39db80b66..da7889b4c55c 100644
--- a/canvas/source/vcl/sprite.hxx
+++ b/canvas/source/vcl/sprite.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: sprite.hxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: rt $ $Date: 2005-09-07 23:23:01 $
+ * last change: $Author: kz $ $Date: 2005-11-02 13:03:59 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -33,71 +33,47 @@
*
************************************************************************/
-#ifndef _VCLCANVAS_SPRITE_HXX
-#define _VCLCANVAS_SPRITE_HXX
+#ifndef INCLUDED_VCLCANVAS_SPRITE_HXX
+#define INCLUDED_VCLCANVAS_SPRITE_HXX
-#ifndef _RTL_REF_HXX_
-#include <rtl/ref.hxx>
-#endif
-
-#ifndef _COM_SUN_STAR_RENDERING_XCANVAS_HPP_
-#include <com/sun/star/rendering/XCanvas.hpp>
-#endif
-
-#ifndef _BGFX_POINT_B2DPOINT_HXX
-#include <basegfx/vector/b2dpoint.hxx>
-#endif
-#ifndef _BGFX_VECTOR_B2DSIZE_HXX
-#include <basegfx/vector/b2dsize.hxx>
-#endif
+#include <canvas/base/sprite.hxx>
class OutputDevice;
namespace vclcanvas
{
- /* Definition of Sprite class */
-
- /** Helper interface to connect SpriteCanvas with various
- sprite implementations.
- */
-
- class Sprite : public ::com::sun::star::uno::XInterface
+ /** Specialization of ::canvas::Sprite interface, to also provide
+ redraw methods.
+ */
+ class Sprite : public ::canvas::Sprite
{
public:
- typedef ::rtl::Reference< Sprite > ImplRef;
- virtual ~Sprite() {}
+ /** Redraw sprite at the stored position.
- /** Repaint whole sprite on given target surface
+ @param bBufferedUpdate
+ When true, the redraw does <em>not</em> happen directly on
+ the front buffer, but within a VDev. Used to speed up
+ drawing.
*/
- virtual void redraw( OutputDevice& rTargetSurface ) const = 0;
+ virtual void redraw( OutputDevice& rOutDev,
+ bool bBufferedUpdate ) const = 0;
- /** Repaint sprite.
+ /** Redraw sprite at the given position.
- @param rTargetSurface
- Target surface to output sprite content
+ @param rPos
+ Output position of the sprite. Overrides the sprite's own
+ output position.
- @param rOutputPos
- Position where to render the sprite (overrides the
- sprite's output position)
+ @param bBufferedUpdate
+ When true, the redraw does <em>not</em> happen directly on
+ the front buffer, but within a VDev. Used to speed up
+ drawing.
*/
- virtual void redraw( OutputDevice& rTargetSurface,
- const Point& rOutputPos ) const = 0;
-
- /** Query whether sprite update will fully cover the given area.
-
- Use this method to determine whether any background
- content (regardless of static or sprite) needs an update
- before rendering this sprite.
-
- @return true, if sprite redraw will fully overwrite given
- area.
- */
- virtual bool isAreaUpdateOpaque( const Rectangle& rUpdateArea ) const = 0;
-
- virtual ::basegfx::B2DPoint getSpritePos() const = 0;
- virtual ::basegfx::B2DSize getSpriteSize() const = 0;
+ virtual void redraw( OutputDevice& rOutDev,
+ const ::basegfx::B2DPoint& rPos,
+ bool bBufferedUpdate ) const = 0;
};
}
-#endif /* _VCLCANVAS_SPRITE_HXX */
+#endif /* INCLUDED_VCLCANVAS_SPRITE_HXX */