Get the style color and number just once
[LibreOffice.git] / cppcanvas / source / wrapper / implpolypolygon.hxx
bloba756b440079595fc7e46764f4601c60bbab21aeb
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 #pragma once
22 #include <com/sun/star/uno/Reference.hxx>
23 #include <com/sun/star/rendering/XPolyPolygon2D.hpp>
24 #include <com/sun/star/rendering/StrokeAttributes.hpp>
26 #include <cppcanvas/polypolygon.hxx>
27 #include <canvasgraphichelper.hxx>
29 namespace com::sun::star::rendering
31 struct RealPoint2D;
35 namespace cppcanvas::internal
38 class ImplPolyPolygon : public virtual ::cppcanvas::PolyPolygon, protected CanvasGraphicHelper
40 public:
41 ImplPolyPolygon( const CanvasSharedPtr& rParentCanvas,
42 css::uno::Reference<
43 css::rendering::XPolyPolygon2D > xPolyPoly );
45 virtual ~ImplPolyPolygon() override;
47 virtual void setRGBAFillColor( IntSRGBA ) override;
48 virtual void setRGBALineColor( IntSRGBA ) override;
49 virtual IntSRGBA getRGBALineColor() const override;
51 virtual void setStrokeWidth( const double& rStrokeWidth ) override;
52 virtual double getStrokeWidth() const override;
54 virtual bool draw() const override;
56 virtual css::uno::Reference<
57 css::rendering::XPolyPolygon2D > getUNOPolyPolygon() const override;
59 private:
60 ImplPolyPolygon(const ImplPolyPolygon&) = delete;
61 ImplPolyPolygon& operator= ( const ImplPolyPolygon& ) = delete;
63 const css::uno::Reference< css::rendering::XPolyPolygon2D > mxPolyPoly;
65 css::rendering::StrokeAttributes maStrokeAttributes;
67 css::uno::Sequence< double > maFillColor;
68 css::uno::Sequence< double > maStrokeColor;
69 bool mbFillColorSet;
70 bool mbStrokeColorSet;
75 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */