1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef _CANVAS_IMPLPOLYPOLYGON_HXX
29 #define _CANVAS_IMPLPOLYPOLYGON_HXX
30 
31 #include <com/sun/star/uno/Reference.hxx>
32 #ifndef _COM_SUN_STAR_RENDERING_XPOLYPOLYGON2D_HPP__
33 #include <com/sun/star/rendering/XPolyPolygon2D.hpp>
34 #endif
35 #ifndef _COM_SUN_STAR_RENDERING_XGRAPHICDEVICE_HPP__
36 #include <com/sun/star/rendering/XGraphicDevice.hpp>
37 #endif
38 #ifndef _COM_SUN_STAR_RENDERING_STROKEATTRIBUTES_HPP__
39 #include <com/sun/star/rendering/StrokeAttributes.hpp>
40 #endif
41 
42 #include <cppcanvas/polypolygon.hxx>
43 #include <canvasgraphichelper.hxx>
44 
45 namespace com { namespace sun { namespace star { namespace rendering
46 {
47     struct RealPoint2D;
48 } } } }
49 
50 
51 namespace cppcanvas
52 {
53     namespace internal
54     {
55 
56         class ImplPolyPolygon : public virtual ::cppcanvas::PolyPolygon, protected CanvasGraphicHelper
57         {
58         public:
59             ImplPolyPolygon( const CanvasSharedPtr& rParentCanvas,
60                              const ::com::sun::star::uno::Reference<
61                              	::com::sun::star::rendering::XPolyPolygon2D >& rPolyPoly );
62 
63             virtual ~ImplPolyPolygon();
64 
65             virtual void 			addPolygon( const ::basegfx::B2DPolygon& rPoly );
66             virtual void 			addPolyPolygon( const ::basegfx::B2DPolyPolygon& rPoly );
67 
68             virtual void			setRGBAFillColor( Color::IntSRGBA );
69             virtual void			setRGBALineColor( Color::IntSRGBA );
70             virtual Color::IntSRGBA	getRGBAFillColor() const;
71             virtual Color::IntSRGBA	getRGBALineColor() const;
72 
73             virtual void 			setStrokeWidth( const double& rStrokeWidth );
74             virtual double 			getStrokeWidth() const;
75 
76             virtual bool 			draw() const;
77 
78             virtual ::com::sun::star::uno::Reference<
79                 ::com::sun::star::rendering::XPolyPolygon2D > getUNOPolyPolygon() const;
80 
81         private:
82             // default: disabled copy/assignment
83             ImplPolyPolygon(const ImplPolyPolygon&);
84             ImplPolyPolygon& operator= ( const ImplPolyPolygon& );
85 
86             const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D > 	mxPolyPoly;
87 
88             ::com::sun::star::rendering::StrokeAttributes											maStrokeAttributes;
89 
90             ::com::sun::star::uno::Sequence< double > 														maFillColor;
91             ::com::sun::star::uno::Sequence< double > 														maStrokeColor;
92             bool																							mbFillColorSet;
93             bool																							mbStrokeColorSet;
94 		};
95 
96 	}
97 }
98 
99 #endif /* _CANVAS_IMPLPOLYPOLYGON_HXX */
100