INTEGRATION: CWS presfixes02 (1.4.14); FILE MERGED

2005/03/14 16:04:50 thb 1.4.14.1: #i35136# #i36914# #i41113# #i44100# #i40115# #i41839# #i44404# Merge from presfixes01 patches
This commit is contained in:
Rüdiger Timm
2005-03-30 07:24:45 +00:00
parent 77a4f46daa
commit 91d05b9e8b

View File

@@ -2,9 +2,9 @@
*
* $RCSfile: action.hxx,v $
*
* $Revision: 1.4 $
* $Revision: 1.5 $
*
* last change: $Author: rt $ $Date: 2004-11-26 20:53:15 $
* last change: $Author: rt $ $Date: 2005-03-30 08:24:45 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -62,8 +62,8 @@
#ifndef _CPPCANVAS_ACTION_HXX
#define _CPPCANVAS_ACTION_HXX
#ifndef _SAL_CONFIG_H_
#include <sal/config.h>
#ifndef _SAL_TYPES_H_
#include <sal/types.h>
#endif
#ifndef BOOST_SHARED_PTR_HPP_INCLUDED
@@ -75,16 +75,55 @@ namespace basegfx
class B2DHomMatrix;
}
/* Definition of Action interface */
namespace cppcanvas
{
namespace internal
{
/** Interface for internal render actions
This interface is implemented by all objects generated
from the metafile renderer, and corresponds roughly to the
VCL meta action.
*/
class Action
{
public:
/** Used for rendering action subsets
There are several cases where an Action might have
subsettable content, e.g. text, or referenced
metafiles, like the transparent action.
Generally, at the metafile renderer, all actions are
'flattened' out, i.e. a meta action rendering the
string "Hello" counts five indices, and a transparent
action containing a metafile with 100 actions counts
at least 100 indices (contained transparency or text
actions recursively add to this value). From the
outside, the subset to render is referenced via this
flat index range
*/
struct Subset
{
/** Denotes start of the subset.
The index given here specifies the first subaction
to render.
*/
sal_Int32 mnSubsetBegin;
/** Denotes end of the subset
The index given here specifies the first subaction
<em>not<em> to render, i.e. one action behind the
subset to be rendered
*/
sal_Int32 mnSubsetEnd;
};
virtual ~Action() {}
/** Render this action to the associated canvas
@@ -93,6 +132,34 @@ namespace cppcanvas
Transformation matrix to apply before rendering
*/
virtual bool render( const ::basegfx::B2DHomMatrix& rTransformation ) const = 0;
/** Render the given part of the action to the associated
canvas.
@param rTransformation
Transformation matrix to apply before rendering
@param rSubset
Subset of the action to render. See Subset description
for index semantics.
@return true, if rendering was successful. If the
specified subset is invalid for this action, or if
rendering failed for other reasons, false is returned.
*/
virtual bool render( const ::basegfx::B2DHomMatrix& rTransformation,
const Subset& rSubset ) const = 0;
/** Query action count.
This method returns the number of subset actions
contained in this action. The render( Subset ) method
must accept subset ranges up to the value returned
here.
@return the number of subset actions
*/
virtual sal_Int32 getActionCount() const = 0;
};
typedef ::boost::shared_ptr< Action > ActionSharedPtr;