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 _CANVAS_IMPLPOLYPOLYGON_HXX 25 #define _CANVAS_IMPLPOLYPOLYGON_HXX 26 27 #include <com/sun/star/uno/Reference.hxx> 28 #ifndef _COM_SUN_STAR_RENDERING_XPOLYPOLYGON2D_HPP__ 29 #include <com/sun/star/rendering/XPolyPolygon2D.hpp> 30 #endif 31 #ifndef _COM_SUN_STAR_RENDERING_XGRAPHICDEVICE_HPP__ 32 #include <com/sun/star/rendering/XGraphicDevice.hpp> 33 #endif 34 #ifndef _COM_SUN_STAR_RENDERING_STROKEATTRIBUTES_HPP__ 35 #include <com/sun/star/rendering/StrokeAttributes.hpp> 36 #endif 37 38 #include <cppcanvas/polypolygon.hxx> 39 #include <canvasgraphichelper.hxx> 40 41 namespace com { namespace sun { namespace star { namespace rendering 42 { 43 struct RealPoint2D; 44 } } } } 45 46 47 namespace cppcanvas 48 { 49 namespace internal 50 { 51 52 class ImplPolyPolygon : public virtual ::cppcanvas::PolyPolygon, protected CanvasGraphicHelper 53 { 54 public: 55 ImplPolyPolygon( const CanvasSharedPtr& rParentCanvas, 56 const ::com::sun::star::uno::Reference< 57 ::com::sun::star::rendering::XPolyPolygon2D >& rPolyPoly ); 58 59 virtual ~ImplPolyPolygon(); 60 61 virtual void addPolygon( const ::basegfx::B2DPolygon& rPoly ); 62 virtual void addPolyPolygon( const ::basegfx::B2DPolyPolygon& rPoly ); 63 64 virtual void setRGBAFillColor( Color::IntSRGBA ); 65 virtual void setRGBALineColor( Color::IntSRGBA ); 66 virtual Color::IntSRGBA getRGBAFillColor() const; 67 virtual Color::IntSRGBA getRGBALineColor() const; 68 69 virtual void setStrokeWidth( const double& rStrokeWidth ); 70 virtual double getStrokeWidth() const; 71 72 virtual bool draw() const; 73 74 virtual ::com::sun::star::uno::Reference< 75 ::com::sun::star::rendering::XPolyPolygon2D > getUNOPolyPolygon() const; 76 77 private: 78 // default: disabled copy/assignment 79 ImplPolyPolygon(const ImplPolyPolygon&); 80 ImplPolyPolygon& operator= ( const ImplPolyPolygon& ); 81 82 const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D > mxPolyPoly; 83 84 ::com::sun::star::rendering::StrokeAttributes maStrokeAttributes; 85 86 ::com::sun::star::uno::Sequence< double > maFillColor; 87 ::com::sun::star::uno::Sequence< double > maStrokeColor; 88 bool mbFillColorSet; 89 bool mbStrokeColorSet; 90 }; 91 92 } 93 } 94 95 #endif /* _CANVAS_IMPLPOLYPOLYGON_HXX */ 96