LibreOffice Module cppcanvas (master) 1
implpolypolygon.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
22#include <com/sun/star/uno/Reference.hxx>
23#include <com/sun/star/rendering/XPolyPolygon2D.hpp>
24#include <com/sun/star/rendering/StrokeAttributes.hpp>
25
28
30{
31 struct RealPoint2D;
32}
33
34
35namespace cppcanvas::internal
36{
37
39 {
40 public:
41 ImplPolyPolygon( const CanvasSharedPtr& rParentCanvas,
42 css::uno::Reference<
43 css::rendering::XPolyPolygon2D > xPolyPoly );
44
45 virtual ~ImplPolyPolygon() override;
46
47 virtual void setRGBAFillColor( IntSRGBA ) override;
48 virtual void setRGBALineColor( IntSRGBA ) override;
49 virtual IntSRGBA getRGBALineColor() const override;
50
51 virtual void setStrokeWidth( const double& rStrokeWidth ) override;
52 virtual double getStrokeWidth() const override;
53
54 virtual bool draw() const override;
55
56 virtual css::uno::Reference<
57 css::rendering::XPolyPolygon2D > getUNOPolyPolygon() const override;
58
59 private:
62
63 const css::uno::Reference< css::rendering::XPolyPolygon2D > mxPolyPoly;
64
65 css::rendering::StrokeAttributes maStrokeAttributes;
66
67 css::uno::Sequence< double > maFillColor;
68 css::uno::Sequence< double > maStrokeColor;
71 };
72
73}
74
75/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
This interface defines a tools::PolyPolygon canvas object.
Definition: polypolygon.hxx:51
ImplPolyPolygon(const ImplPolyPolygon &)=delete
virtual css::uno::Reference< css::rendering::XPolyPolygon2D > getUNOPolyPolygon() const override
css::uno::Sequence< double > maFillColor
virtual void setRGBALineColor(IntSRGBA) override
Set polygon line color.
const css::uno::Reference< css::rendering::XPolyPolygon2D > mxPolyPoly
ImplPolyPolygon & operator=(const ImplPolyPolygon &)=delete
virtual void setStrokeWidth(const double &rStrokeWidth) override
virtual IntSRGBA getRGBALineColor() const override
Get polygon line color.
css::rendering::StrokeAttributes maStrokeAttributes
virtual double getStrokeWidth() const override
css::uno::Sequence< double > maStrokeColor
ImplPolyPolygon(const CanvasSharedPtr &rParentCanvas, css::uno::Reference< css::rendering::XPolyPolygon2D > xPolyPoly)
virtual void setRGBAFillColor(IntSRGBA) override
Set polygon fill color.
virtual bool draw() const override
Render to parent canvas.
sal_uInt32 IntSRGBA
Color in the sRGB color space, plus alpha channel.
Definition: color.hxx:34
std::shared_ptr< Canvas > CanvasSharedPtr