2010-10-14 08:27:31 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-10-08 10:00:18 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2004-03-18 09:38:44 +00:00
|
|
|
|
2013-11-05 01:47:54 +01:00
|
|
|
#ifndef INCLUDED_CANVAS_SOURCE_VCL_SPRITE_HXX
|
|
|
|
#define INCLUDED_CANVAS_SOURCE_VCL_SPRITE_HXX
|
2004-03-18 09:38:44 +00:00
|
|
|
|
2005-11-02 12:03:59 +00:00
|
|
|
#include <canvas/base/sprite.hxx>
|
2004-03-18 09:38:44 +00:00
|
|
|
|
|
|
|
class OutputDevice;
|
|
|
|
|
|
|
|
namespace vclcanvas
|
|
|
|
{
|
2005-11-02 12:03:59 +00:00
|
|
|
/** Specialization of ::canvas::Sprite interface, to also provide
|
|
|
|
redraw methods.
|
|
|
|
*/
|
|
|
|
class Sprite : public ::canvas::Sprite
|
2004-03-18 09:38:44 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2005-11-02 12:03:59 +00:00
|
|
|
/** Redraw sprite at the stored position.
|
2004-03-18 09:38:44 +00:00
|
|
|
|
2005-11-02 12:03:59 +00:00
|
|
|
@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.
|
2005-05-06 08:17:56 +00:00
|
|
|
*/
|
2005-11-02 12:03:59 +00:00
|
|
|
virtual void redraw( OutputDevice& rOutDev,
|
|
|
|
bool bBufferedUpdate ) const = 0;
|
2004-03-18 09:38:44 +00:00
|
|
|
|
2005-11-02 12:03:59 +00:00
|
|
|
/** Redraw sprite at the given position.
|
2004-11-26 16:15:14 +00:00
|
|
|
|
2005-11-02 12:03:59 +00:00
|
|
|
@param rPos
|
|
|
|
Output position of the sprite. Overrides the sprite's own
|
|
|
|
output position.
|
2005-05-06 08:17:56 +00:00
|
|
|
|
2005-11-02 12:03:59 +00:00
|
|
|
@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.
|
2005-05-06 08:17:56 +00:00
|
|
|
*/
|
2005-11-02 12:03:59 +00:00
|
|
|
virtual void redraw( OutputDevice& rOutDev,
|
|
|
|
const ::basegfx::B2DPoint& rPos,
|
|
|
|
bool bBufferedUpdate ) const = 0;
|
2012-03-14 13:27:56 +01:00
|
|
|
|
|
|
|
protected:
|
|
|
|
~Sprite() {}
|
2004-03-18 09:38:44 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2013-11-05 01:47:54 +01:00
|
|
|
#endif // INCLUDED_CANVAS_SOURCE_VCL_SPRITE_HXX
|
2010-10-14 08:27:31 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|