summaryrefslogtreecommitdiff
path: root/cppcanvas/source/inc/action.hxx
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2005-03-30 07:24:45 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2005-03-30 07:24:45 +0000
commit91d05b9e8b3128784798a9d67ace31aa146fa250 (patch)
tree1ee083ef152a71ca7877652eb1f34ecfdd7494a9 /cppcanvas/source/inc/action.hxx
parent77a4f46daa97956288effe32d96c888d105e6873 (diff)
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
Diffstat (limited to 'cppcanvas/source/inc/action.hxx')
-rw-r--r--cppcanvas/source/inc/action.hxx75
1 files changed, 71 insertions, 4 deletions
diff --git a/cppcanvas/source/inc/action.hxx b/cppcanvas/source/inc/action.hxx
index 923c5ded406f..e4353fc373b5 100644
--- a/cppcanvas/source/inc/action.hxx
+++ b/cppcanvas/source/inc/action.hxx
@@ -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;