summaryrefslogtreecommitdiff
path: root/drawinglayer/inc/drawinglayer/processor2d
diff options
context:
space:
mode:
authorArmin Weiss <aw@openoffice.org>2007-12-18 14:10:54 +0000
committerArmin Weiss <aw@openoffice.org>2007-12-18 14:10:54 +0000
commit43f54a02f8aff4f4f9a0ad4be3c1edb3c5e9eb31 (patch)
treedc42dc23c3c382ea34e564ffad8903145a24129c /drawinglayer/inc/drawinglayer/processor2d
parent9eb0f8b0cc4b61c3c99cc19e015f176498468cce (diff)
#i39532# added rudimentary canvas renderer
Diffstat (limited to 'drawinglayer/inc/drawinglayer/processor2d')
-rw-r--r--drawinglayer/inc/drawinglayer/processor2d/canvasprocessor.hxx134
-rw-r--r--drawinglayer/inc/drawinglayer/processor2d/vclmetafileprocessor2d.hxx8
-rw-r--r--drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx8
3 files changed, 142 insertions, 8 deletions
diff --git a/drawinglayer/inc/drawinglayer/processor2d/canvasprocessor.hxx b/drawinglayer/inc/drawinglayer/processor2d/canvasprocessor.hxx
new file mode 100644
index 000000000000..dfc1db891d97
--- /dev/null
+++ b/drawinglayer/inc/drawinglayer/processor2d/canvasprocessor.hxx
@@ -0,0 +1,134 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: canvasprocessor.hxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: aw $ $Date: 2007-12-18 15:10:11 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#ifndef _DRAWINGLAYER_PROCESSOR_CANVASPROCESSOR_HXX
+#define _DRAWINGLAYER_PROCESSOR_CANVASPROCESSOR_HXX
+
+#ifndef INCLUDED_DRAWINGLAYER_PROCESSOR2D_BASEPROCESSOR2D_HXX
+#include <drawinglayer/processor2d/baseprocessor2d.hxx>
+#endif
+
+#ifndef _BGFX_MATRIX_B2DHOMMATRIX_HXX
+#include <basegfx/matrix/b2dhommatrix.hxx>
+#endif
+
+#ifndef _BGFX_COLOR_BCOLORMODIFIER_HXX
+#include <basegfx/color/bcolormodifier.hxx>
+#endif
+
+#ifndef INCLUDED_SVTOOLS_OPTIONSDRAWINGLAYER_HXX
+#include <svtools/optionsdrawinglayer.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_RENDERING_VIEWSTATE_HPP_
+#include <com/sun/star/rendering/ViewState.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_RENDERING_RENDERSTATE_HPP_
+#include <com/sun/star/rendering/RenderState.hpp>
+#endif
+
+#ifndef INCLUDED_I18NPOOL_LANG_H
+#include <i18npool/lang.h>
+#endif
+
+//////////////////////////////////////////////////////////////////////////////
+// forward declaration
+
+namespace basegfx {
+ class BColor;
+ class B2DPolygon;
+ class B2DPolyPolygon;
+}
+
+namespace com { namespace sun { namespace star { namespace rendering {
+ class XCanvas;
+ class XPolyPolygon2D;
+}}}}
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace processor2d
+ {
+ class canvasProcessor2D : public BaseProcessor2D
+ {
+ private:
+ // the destination canvas
+ com::sun::star::uno::Reference< com::sun::star::rendering::XCanvas > mxCanvas;
+ com::sun::star::rendering::ViewState maViewState;
+ com::sun::star::rendering::RenderState maRenderState;
+
+ // the modifiedColorPrimitive stack
+ basegfx::BColorModifierStack maBColorModifierStack;
+
+ // the current transformation
+ basegfx::B2DHomMatrix maCurrentTransformation;
+
+ // SvtOptionsDrawinglayer incarnation to react on diverse settings
+ const SvtOptionsDrawinglayer maDrawinglayerOpt;
+
+ // stack value (increment and decrement) to count how deep we are in
+ // PolygonStrokePrimitive2D's decompositions (normally only one)
+ sal_uInt32 mnPolygonStrokePrimitive2D;
+
+ // determined LanguageType
+ LanguageType meLang;
+
+ // as tooling, the process() implementation takes over API handling and calls this
+ // virtual render method when the primitive implementation is BasePrimitive2D-based.
+ virtual void processBasePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate);
+
+ public:
+ canvasProcessor2D(
+ const geometry::ViewInformation2D& rViewInformation,
+ const com::sun::star::uno::Reference< com::sun::star::rendering::XCanvas >& rCanvas);
+ virtual ~canvasProcessor2D();
+
+ // the central processing method
+ virtual void process(const primitive2d::Primitive2DSequence& rSource);
+
+ // access to Drawinglayer configuration options
+ const SvtOptionsDrawinglayer& getOptionsDrawinglayer() const { return maDrawinglayerOpt; }
+ };
+ } // end of namespace processor2d
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_DRAWINGLAYER_PROCESSOR_CANVASPROCESSOR_HXX
+
+// eof
diff --git a/drawinglayer/inc/drawinglayer/processor2d/vclmetafileprocessor2d.hxx b/drawinglayer/inc/drawinglayer/processor2d/vclmetafileprocessor2d.hxx
index 4c9df575c58e..2bd792f98246 100644
--- a/drawinglayer/inc/drawinglayer/processor2d/vclmetafileprocessor2d.hxx
+++ b/drawinglayer/inc/drawinglayer/processor2d/vclmetafileprocessor2d.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: vclmetafileprocessor2d.hxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: aw $ $Date: 2007-11-07 14:27:17 $
+ * last change: $Author: aw $ $Date: 2007-12-18 15:10:11 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -44,6 +44,10 @@
#include <com/sun/star/i18n/XBreakIterator.hpp>
#endif
+#ifndef _BGFX_POLYGON_B2DPOLYPOLYGON_HXX
+#include <basegfx/polygon/b2dpolypolygon.hxx>
+#endif
+
//////////////////////////////////////////////////////////////////////////////
// vcl::PDFExtOutDevData support
diff --git a/drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx b/drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx
index 36a5f01e066e..e7c6b1682036 100644
--- a/drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx
+++ b/drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: vclprocessor2d.hxx,v $
*
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
- * last change: $Author: aw $ $Date: 2007-12-13 16:43:01 $
+ * last change: $Author: aw $ $Date: 2007-12-18 15:10:11 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -48,10 +48,6 @@
#include <basegfx/color/bcolormodifier.hxx>
#endif
-#ifndef _BGFX_POLYGON_B2DPOLYPOLYGON_HXX
-#include <basegfx/polygon/b2dpolypolygon.hxx>
-#endif
-
#ifndef INCLUDED_SVTOOLS_OPTIONSDRAWINGLAYER_HXX
#include <svtools/optionsdrawinglayer.hxx>
#endif