summaryrefslogtreecommitdiff
path: root/cppcanvas/source/mtfrenderer/polypolyaction.hxx
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2005-03-30 07:31:44 +0000
committerRüdiger Timm <rt@openoffice.org>2005-03-30 07:31:44 +0000
commit05d2ee40ac57f2721df5175574c4375b54a8242a (patch)
treec5ac2345543ba0756381585ab25383fe6438b76e /cppcanvas/source/mtfrenderer/polypolyaction.hxx
parentb0ed7fca7459b0c5a7bd29315b5a882ea67c8422 (diff)
INTEGRATION: CWS presfixes02 (1.4.2); FILE MERGED
2005/03/14 16:04:54 thb 1.4.2.1: #i35136# #i36914# #i41113# #i44100# #i40115# #i41839# #i44404# Merge from presfixes01 patches
Diffstat (limited to 'cppcanvas/source/mtfrenderer/polypolyaction.hxx')
-rw-r--r--cppcanvas/source/mtfrenderer/polypolyaction.hxx106
1 files changed, 48 insertions, 58 deletions
diff --git a/cppcanvas/source/mtfrenderer/polypolyaction.hxx b/cppcanvas/source/mtfrenderer/polypolyaction.hxx
index 7ca30def001c..77aa36a8b23a 100644
--- a/cppcanvas/source/mtfrenderer/polypolyaction.hxx
+++ b/cppcanvas/source/mtfrenderer/polypolyaction.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: polypolyaction.hxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: vg $ $Date: 2005-03-10 13:26:22 $
+ * last change: $Author: rt $ $Date: 2005-03-30 08:31:44 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -62,28 +62,19 @@
#ifndef _CPPCANVAS_POLYPOLYACTION_HXX
#define _CPPCANVAS_POLYPOLYACTION_HXX
-#ifndef _COM_SUN_STAR_UNO_REFERENCE_HXX_
-#include <com/sun/star/uno/Reference.hxx>
-#endif
-
-#ifndef _COM_SUN_STAR_RENDERING_RENDERSTATE_HPP__
-#include <com/sun/star/rendering/RenderState.hpp>
-#endif
-
-#ifndef _COM_SUN_STAR_RENDERING_XPOLYPOLYGON2D_HPP__
-#include <com/sun/star/rendering/XPolyPolygon2D.hpp>
-#endif
-#ifndef _COM_SUN_STAR_RENDERING_TEXTURE_HPP_
-#include <com/sun/star/rendering/Texture.hpp>
-#endif
-
#include <action.hxx>
#include <cppcanvas/canvas.hxx>
class PolyPolygon;
-class Color;
-/* Definition of internal::PolyPolyAction class */
+namespace com { namespace sun { namespace star { namespace rendering
+{
+ struct Texture;
+ struct StrokeAttributes;
+} } } }
+
+
+/* Definition of internal::PolyPolyActionFactory class */
namespace cppcanvas
{
@@ -91,51 +82,50 @@ namespace cppcanvas
{
struct OutDevState;
- class PolyPolyAction : public Action
+ /** Creates encapsulated converters between GDIMetaFile and
+ XCanvas. The Canvas argument is deliberately placed at the
+ constructor, to force reconstruction of this object for a
+ new canvas. This considerably eases internal state
+ handling, since a lot of the internal state (e.g. fonts,
+ text layout) is Canvas-dependent.
+ */
+ class PolyPolyActionFactory
{
public:
- enum Mode
- {
- /// regardless of the state, only stroke polygon (if line color is set, that is)
- strokeOnly
- };
+ /// Create polygon, fill/stroke according to state
+ static ActionSharedPtr createPolyPolyAction( const ::PolyPolygon&,
+ const CanvasSharedPtr&,
+ const OutDevState& );
+
+ /// Create texture-filled polygon
+ static ActionSharedPtr createPolyPolyAction( const ::PolyPolygon&,
+ const CanvasSharedPtr&,
+ const OutDevState&,
+ const ::com::sun::star::rendering::Texture& );
+
+ /// Create line polygon (always stroked, not filled)
+ static ActionSharedPtr createLinePolyPolyAction( const ::PolyPolygon&,
+ const CanvasSharedPtr&,
+ const OutDevState& );
+
+ /// Create stroked polygon
+ static ActionSharedPtr createPolyPolyAction( const ::PolyPolygon&,
+ const CanvasSharedPtr&,
+ const OutDevState&,
+ const ::com::sun::star::rendering::StrokeAttributes& );
- PolyPolyAction( const ::PolyPolygon&,
- const CanvasSharedPtr&,
- const OutDevState& );
- PolyPolyAction( const ::PolyPolygon&,
- const CanvasSharedPtr&,
- const OutDevState&,
- const ::com::sun::star::rendering::Texture& );
- PolyPolyAction( const ::PolyPolygon&,
- const CanvasSharedPtr&,
- const OutDevState&,
- Mode );
/// For transparent painting of the given polygon (normally, we take the colors always opaque)
- PolyPolyAction( const ::PolyPolygon&,
- const CanvasSharedPtr&,
- const OutDevState&,
- int nTransparency );
- virtual ~PolyPolyAction();
-
- virtual bool render( const ::basegfx::B2DHomMatrix& rTransformation ) const;
+ static ActionSharedPtr createPolyPolyAction( const ::PolyPolygon&,
+ const CanvasSharedPtr&,
+ const OutDevState&,
+ int nTransparency );
private:
- // default: disabled copy/assignment
- PolyPolyAction(const PolyPolyAction&);
- PolyPolyAction& operator = ( const PolyPolyAction& );
-
- ::com::sun::star::uno::Reference<
- ::com::sun::star::rendering::XPolyPolygon2D > mxPolyPoly;
- CanvasSharedPtr mpCanvas;
- ::com::sun::star::rendering::RenderState maState;
-
- ::com::sun::star::rendering::Texture maTexture;
-
- ::com::sun::star::uno::Sequence< double > maFillColor;
- ::com::sun::star::uno::Sequence< double > maStrokeColor;
- bool mbFill;
- bool mbStroke;
+ // static factory, disable big four
+ PolyPolyActionFactory();
+ ~PolyPolyActionFactory();
+ PolyPolyActionFactory(const PolyPolyActionFactory&);
+ PolyPolyActionFactory& operator=( const PolyPolyActionFactory& );
};
}
}