Version 4.2.0.1, tag libreoffice-4.2.0.1
[LibreOffice.git] / cppcanvas / source / wrapper / implpolypolygon.hxx
blob1503ed05818fb4fd876d597feef6a758132afbc5
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef _CANVAS_IMPLPOLYPOLYGON_HXX
21 #define _CANVAS_IMPLPOLYPOLYGON_HXX
23 #include <com/sun/star/uno/Reference.hxx>
24 #include <com/sun/star/rendering/XPolyPolygon2D.hpp>
25 #include <com/sun/star/rendering/XGraphicDevice.hpp>
26 #include <com/sun/star/rendering/StrokeAttributes.hpp>
28 #include <cppcanvas/polypolygon.hxx>
29 #include <canvasgraphichelper.hxx>
31 namespace com { namespace sun { namespace star { namespace rendering
33 struct RealPoint2D;
34 } } } }
37 namespace cppcanvas
39 namespace internal
42 class ImplPolyPolygon : public virtual ::cppcanvas::PolyPolygon, protected CanvasGraphicHelper
44 public:
45 ImplPolyPolygon( const CanvasSharedPtr& rParentCanvas,
46 const ::com::sun::star::uno::Reference<
47 ::com::sun::star::rendering::XPolyPolygon2D >& rPolyPoly );
49 virtual ~ImplPolyPolygon();
51 virtual void addPolygon( const ::basegfx::B2DPolygon& rPoly );
52 virtual void addPolyPolygon( const ::basegfx::B2DPolyPolygon& rPoly );
54 virtual void setRGBAFillColor( Color::IntSRGBA );
55 virtual void setRGBALineColor( Color::IntSRGBA );
56 virtual Color::IntSRGBA getRGBAFillColor() const;
57 virtual Color::IntSRGBA getRGBALineColor() const;
59 virtual void setStrokeWidth( const double& rStrokeWidth );
60 virtual double getStrokeWidth() const;
62 virtual bool draw() const;
64 virtual ::com::sun::star::uno::Reference<
65 ::com::sun::star::rendering::XPolyPolygon2D > getUNOPolyPolygon() const;
67 private:
68 // default: disabled copy/assignment
69 ImplPolyPolygon(const ImplPolyPolygon&);
70 ImplPolyPolygon& operator= ( const ImplPolyPolygon& );
72 const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D > mxPolyPoly;
74 ::com::sun::star::rendering::StrokeAttributes maStrokeAttributes;
76 ::com::sun::star::uno::Sequence< double > maFillColor;
77 ::com::sun::star::uno::Sequence< double > maStrokeColor;
78 bool mbFillColorSet;
79 bool mbStrokeColorSet;
85 #endif /* _CANVAS_IMPLPOLYPOLYGON_HXX */
87 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */