KiCad PCB EDA Suite
Loading...
Searching...
No Matches
polygon_item.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KICAD, a free EDA CAD application.
3 *
4 * Copyright (C) 2017-2022 Kicad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, you may find one here:
18 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
19 * or you may search the http://www.gnu.org website for the version 2 license,
20 * or you may write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22 */
23
24#ifndef PREVIEW_POLYGON_ITEM__H_
25#define PREVIEW_POLYGON_ITEM__H_
26
28
31
32namespace KIGFX
33{
34
35class GAL;
36class VIEW;
37
38namespace PREVIEW
39{
40
45{
46
47public:
49
51 virtual const BOX2I ViewBBox() const override;
52
61 void SetPoints( const SHAPE_LINE_CHAIN& aLockedInPts, const SHAPE_LINE_CHAIN& aLeaderPts,
62 const SHAPE_LINE_CHAIN& aLoopPts );
63
64private:
66 void drawPreviewShape( KIGFX::VIEW* aView ) const override;
67
70
73
74 static const double POLY_LINE_WIDTH;
75};
76
77} // PREVIEW
78} // KIGFX
79
80#endif // PREVIEW_POLYGON_ITEM__H_
A preview item which shows an in-progress polygon, which can be used for zone outlines,...
Definition: polygon_item.h:45
virtual const BOX2I ViewBBox() const override
Return the bounding box of the item covering all its layers.
void drawPreviewShape(KIGFX::VIEW *aView) const override
< Draw rectangle and center line onto GAL
SHAPE_LINE_CHAIN m_lockedChain
Definition: polygon_item.h:69
void SetPoints(const SHAPE_LINE_CHAIN &aLockedInPts, const SHAPE_LINE_CHAIN &aLeaderPts, const SHAPE_LINE_CHAIN &aLoopPts)
Set the polygon points.
static const double POLY_LINE_WIDTH
Definition: polygon_item.h:74
SHAPE_LINE_CHAIN m_leaderChain
Definition: polygon_item.h:69
POLYGON_ITEM()
Gets the bounding box of the polygon.
SHAPE_LINE_CHAIN m_loopChain
polygon fill
Definition: polygon_item.h:69
SIMPLE_OVERLAY_ITEM is class that represents a visual area drawn on a canvas, used to temporarily dem...
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
Definition: view.h:68
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
Represent a set of closed polygons.
The Cairo implementation of the graphics abstraction layer.
Definition: color4d.cpp:247