1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef INCLUDED_DRAWINGLAYER_PROCESSOR2D_VCLPIXELPROCESSOR2D_HXX
25 #define INCLUDED_DRAWINGLAYER_PROCESSOR2D_VCLPIXELPROCESSOR2D_HXX
26 
27 #include <drawinglayer/drawinglayerdllapi.h>
28 #include <drawinglayer/processor2d/vclprocessor2d.hxx>
29 #include <vcl/outdev.hxx>
30 
31 //////////////////////////////////////////////////////////////////////////////
32 // predefines
33 
34 namespace drawinglayer { namespace primitive2d {
35     class PolyPolygonColorPrimitive2D;
36     class PolygonHairlinePrimitive2D;
37     class PolygonStrokePrimitive2D;
38 }}
39 
40 //////////////////////////////////////////////////////////////////////////////
41 
42 namespace drawinglayer
43 {
44 	namespace processor2d
45 	{
46         /** VclPixelProcessor2D class
47 
48             This processor derived from VclProcessor2D is the base class for rendering
49             all feeded primitives to a VCL Window. It is the currently used renderer
50             for all VCL editing output from the DrawingLayer.
51          */
52 		class VclPixelProcessor2D : public VclProcessor2D
53 		{
54         private:
55 		protected:
56 			/*  the local processor for BasePrinitive2D-Implementation based primitives,
57 			    called from the common process()-implementation
58              */
59 			virtual void processBasePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate);
60 
61             // some helpers to try direct paints (shortcuts)
62             bool tryDrawPolyPolygonColorPrimitive2DDirect(const drawinglayer::primitive2d::PolyPolygonColorPrimitive2D& rSource, double fTransparency);
63             bool tryDrawPolygonHairlinePrimitive2DDirect(const drawinglayer::primitive2d::PolygonHairlinePrimitive2D& rSource, double fTransparency);
64             bool tryDrawPolygonStrokePrimitive2DDirect(const drawinglayer::primitive2d::PolygonStrokePrimitive2D& rSource, double fTransparency);
65 
66         public:
67 			/// constructor/destructor
68 			VclPixelProcessor2D(
69 				const geometry::ViewInformation2D& rViewInformation,
70 				OutputDevice& rOutDev);
71 			virtual ~VclPixelProcessor2D();
72 		};
73 	} // end of namespace processor2d
74 } // end of namespace drawinglayer
75 
76 //////////////////////////////////////////////////////////////////////////////
77 
78 #endif // INCLUDED_DRAWINGLAYER_PROCESSOR2D_VCLPIXELPROCESSOR2D_HXX
79 
80 // eof
81