pcbnew: added graphical polygon drawing & editing tools
This commit is contained in:
parent
46edf6519c
commit
d9bfbb4fec
|
@ -116,6 +116,8 @@ set( BMAPS_MID
|
|||
add_dimension
|
||||
add_entry
|
||||
add_glabel
|
||||
add_graphical_segments
|
||||
add_graphical_polygon
|
||||
add_hierarchical_label
|
||||
add_hierar_pin
|
||||
add_hierarchical_subsheet
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
|
||||
/* Do not modify this file, it was automatically generated by the
|
||||
* PNG2cpp CMake script, using a *.png file as input.
|
||||
*/
|
||||
|
||||
#include <bitmaps.h>
|
||||
|
||||
static const unsigned char png[] = {
|
||||
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
|
||||
0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c,
|
||||
0xce, 0x00, 0x00, 0x01, 0x61, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0x63, 0x60, 0x18, 0x05, 0xd4,
|
||||
0x01, 0x27, 0x0e, 0x03, 0xf1, 0x67, 0x20, 0xbe, 0x0a, 0xc4, 0x3b, 0x81, 0x78, 0x1e, 0x03, 0xc3,
|
||||
0xf1, 0x06, 0x20, 0x4e, 0x01, 0x62, 0x4f, 0x06, 0x86, 0x53, 0xda, 0x0c, 0x0c, 0x67, 0xf8, 0xa9,
|
||||
0x61, 0xd1, 0x7f, 0x22, 0x31, 0xba, 0x63, 0xaa, 0x19, 0x18, 0x0e, 0x0b, 0x92, 0x6c, 0x51, 0x76,
|
||||
0xf6, 0xbb, 0xff, 0x31, 0x31, 0x2f, 0xfe, 0xfb, 0xf9, 0x3d, 0xfe, 0xef, 0xe0, 0x70, 0xef, 0xbf,
|
||||
0xa1, 0xe1, 0xcd, 0xff, 0xca, 0xca, 0x57, 0xfe, 0x8b, 0x8a, 0x9e, 0xff, 0xcf, 0xc6, 0x76, 0x1a,
|
||||
0x97, 0xe5, 0xfd, 0x24, 0x5b, 0xd4, 0xd8, 0xf8, 0x15, 0x2f, 0xae, 0xac, 0xfc, 0x0c, 0x77, 0x8c,
|
||||
0xab, 0xeb, 0x43, 0x98, 0x45, 0x2f, 0x18, 0x18, 0xf6, 0xb3, 0x50, 0xd5, 0x22, 0x74, 0x2c, 0x26,
|
||||
0x76, 0x1e, 0x6a, 0xd9, 0x31, 0x0f, 0x9a, 0x5a, 0xe4, 0xe4, 0x74, 0x1f, 0xe6, 0xab, 0xc5, 0x34,
|
||||
0xb5, 0xa8, 0xb0, 0xf0, 0x3d, 0xcc, 0xa2, 0x2f, 0xc0, 0xe0, 0xe3, 0xa1, 0x99, 0x45, 0x20, 0x2c,
|
||||
0x27, 0x77, 0x19, 0x66, 0x59, 0x2c, 0x4d, 0x2d, 0xf2, 0xf1, 0x79, 0x0c, 0xb3, 0x68, 0x07, 0x4d,
|
||||
0x2d, 0xaa, 0xa8, 0xf8, 0xf4, 0x9f, 0x99, 0xf9, 0x14, 0x48, 0xff, 0x1f, 0x60, 0xc6, 0x96, 0xa0,
|
||||
0x99, 0x45, 0x20, 0xac, 0xa1, 0x71, 0x0d, 0xea, 0xab, 0x93, 0x85, 0x34, 0xb5, 0x28, 0x3c, 0xfc,
|
||||
0x19, 0x2c, 0xf8, 0xce, 0xd0, 0xd4, 0xa2, 0xba, 0xba, 0x2f, 0xff, 0x39, 0x39, 0x61, 0x25, 0xc7,
|
||||
0x69, 0x1d, 0x9a, 0x59, 0x04, 0xc2, 0xc6, 0xc6, 0xb7, 0xa0, 0x16, 0x1d, 0x6f, 0xa5, 0xba, 0x45,
|
||||
0xd5, 0xd5, 0x9f, 0xff, 0x27, 0x26, 0xbe, 0xfc, 0xef, 0xe2, 0xf2, 0xe0, 0xbf, 0x8c, 0xcc, 0x25,
|
||||
0x58, 0xf0, 0xdd, 0xa7, 0xd8, 0xa2, 0xfc, 0xfc, 0x77, 0xff, 0x83, 0x82, 0x9e, 0xfe, 0x37, 0x33,
|
||||
0xbb, 0xfd, 0x5f, 0x52, 0xf2, 0xe2, 0x7f, 0x26, 0xa6, 0x93, 0xd8, 0x0a, 0xd9, 0xc3, 0x24, 0x59,
|
||||
0x54, 0x53, 0xf3, 0xf9, 0x7f, 0x72, 0xf2, 0xab, 0xff, 0x9e, 0x9e, 0x0f, 0xff, 0x6b, 0x6b, 0x5f,
|
||||
0xff, 0xcf, 0xc3, 0x73, 0x06, 0x9b, 0xa1, 0x7f, 0xa0, 0xd5, 0xc6, 0x22, 0x20, 0x4e, 0x83, 0xd4,
|
||||
0x5b, 0xff, 0x19, 0x09, 0x5a, 0x44, 0x84, 0x6b, 0x5f, 0x02, 0xf1, 0x46, 0x20, 0xae, 0x00, 0x16,
|
||||
0xa4, 0xf6, 0x0c, 0x0c, 0x17, 0xb9, 0xa9, 0x51, 0xf1, 0x91, 0xea, 0x5a, 0xa2, 0xab, 0x72, 0x4a,
|
||||
0x5d, 0x3b, 0x0a, 0xa8, 0x0b, 0x00, 0x9e, 0x40, 0x15, 0x36, 0x37, 0x00, 0x77, 0x7b, 0x00, 0x00,
|
||||
0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82,
|
||||
};
|
||||
|
||||
const BITMAP_OPAQUE add_graphical_polygon_xpm[1] = {{ png, sizeof( png ), "add_graphical_polygon_xpm" }};
|
||||
|
||||
//EOF
|
|
@ -0,0 +1,51 @@
|
|||
|
||||
/* Do not modify this file, it was automatically generated by the
|
||||
* PNG2cpp CMake script, using a *.png file as input.
|
||||
*/
|
||||
|
||||
#include <bitmaps.h>
|
||||
|
||||
static const unsigned char png[] = {
|
||||
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
|
||||
0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c,
|
||||
0xce, 0x00, 0x00, 0x02, 0x1d, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0x63, 0x60, 0xa0, 0x27, 0xc8,
|
||||
0xcd, 0xcd, 0x65, 0x4f, 0xc9, 0x4e, 0x9d, 0x94, 0x92, 0x95, 0xf2, 0x01, 0x84, 0x93, 0x73, 0x52,
|
||||
0x27, 0x80, 0xc4, 0xa8, 0x6e, 0x11, 0xc8, 0x92, 0xb0, 0xba, 0xa8, 0x6f, 0x86, 0x3b, 0x1c, 0xff,
|
||||
0x1b, 0xec, 0x70, 0xf8, 0x1f, 0x56, 0x17, 0xf3, 0x15, 0x64, 0x19, 0x31, 0x7a, 0x53, 0x53, 0x53,
|
||||
0xdd, 0xd3, 0xd2, 0xd2, 0x0a, 0x81, 0xd8, 0x8d, 0xb0, 0x45, 0x40, 0x5f, 0x80, 0x2c, 0xd0, 0x3a,
|
||||
0x64, 0x03, 0xc6, 0x20, 0x0b, 0xe3, 0xd3, 0x32, 0x7f, 0x33, 0x30, 0x9c, 0x98, 0xc7, 0xc0, 0x70,
|
||||
0xbc, 0x01, 0x88, 0x53, 0x80, 0xd8, 0x93, 0x81, 0xe1, 0x94, 0x36, 0x03, 0xc3, 0x19, 0x7e, 0x98,
|
||||
0xbe, 0xa4, 0xec, 0x94, 0xcd, 0xb1, 0x25, 0x09, 0x9f, 0xbc, 0xfb, 0x82, 0x7f, 0xc5, 0x16, 0xc7,
|
||||
0x7f, 0x4a, 0xca, 0x4e, 0xda, 0x48, 0xb2, 0x45, 0x71, 0x29, 0xd9, 0xff, 0x81, 0x16, 0xe1, 0xc2,
|
||||
0x9f, 0x15, 0x14, 0x56, 0x3c, 0x8c, 0x2c, 0x48, 0xf9, 0xad, 0x7d, 0xd0, 0x16, 0xac, 0x47, 0xfb,
|
||||
0x80, 0xed, 0xff, 0x38, 0xa0, 0xa5, 0xe9, 0xe9, 0xe9, 0xae, 0x38, 0x2d, 0x02, 0x05, 0x53, 0x78,
|
||||
0x6d, 0xf4, 0x37, 0x90, 0x65, 0x20, 0x4b, 0xc2, 0x6a, 0x62, 0xbe, 0x07, 0x84, 0x95, 0xad, 0x87,
|
||||
0xfa, 0xa4, 0x01, 0xe2, 0xb3, 0x13, 0x3b, 0x81, 0xf8, 0x2a, 0xc8, 0x12, 0x90, 0x65, 0x7a, 0x7a,
|
||||
0x73, 0xfe, 0x7b, 0x75, 0x87, 0xc1, 0x1d, 0x07, 0xc2, 0x3e, 0xbd, 0xc1, 0x3f, 0x81, 0x16, 0x15,
|
||||
0xe1, 0x4d, 0x0c, 0x20, 0xcb, 0x52, 0xb2, 0x53, 0xde, 0x83, 0x70, 0x72, 0x56, 0x6a, 0x5f, 0x68,
|
||||
0x68, 0x28, 0x1b, 0xee, 0x30, 0x38, 0xc3, 0xef, 0xee, 0xde, 0x96, 0x1a, 0x5d, 0x98, 0xf0, 0x0d,
|
||||
0xe4, 0x13, 0x64, 0x1f, 0x01, 0xe3, 0xcc, 0x85, 0xea, 0x89, 0x08, 0x14, 0x27, 0x20, 0xc3, 0xbd,
|
||||
0x7b, 0xc2, 0xfe, 0x45, 0xe6, 0xa5, 0xfd, 0x8f, 0x88, 0xcf, 0x3f, 0x46, 0xb3, 0xac, 0x01, 0x4a,
|
||||
0x6d, 0xf6, 0xf6, 0xdd, 0xdb, 0xa4, 0xa5, 0xd7, 0x81, 0xe2, 0x6e, 0x31, 0x8d, 0x73, 0xe2, 0x51,
|
||||
0x79, 0xa0, 0x25, 0xff, 0x80, 0xf8, 0x0b, 0x03, 0xc3, 0x7e, 0x1e, 0x1a, 0x5b, 0x76, 0xe2, 0x30,
|
||||
0x34, 0x45, 0xc6, 0xd2, 0xd8, 0xa2, 0x93, 0x19, 0x50, 0x8b, 0x76, 0xd0, 0xd8, 0xa2, 0xc3, 0x82,
|
||||
0x40, 0xcb, 0x7e, 0x00, 0x2d, 0xfa, 0x03, 0xcc, 0xd8, 0x12, 0xb4, 0x0e, 0xbe, 0xf5, 0x10, 0x5f,
|
||||
0x9d, 0x2c, 0xa4, 0xb5, 0x45, 0xc1, 0xd0, 0xe0, 0x3b, 0x43, 0x53, 0x6b, 0xac, 0xad, 0xe7, 0xf2,
|
||||
0x5a, 0xdb, 0xf7, 0x7e, 0x8f, 0x4b, 0xc9, 0xfa, 0x9f, 0x9c, 0x99, 0xfa, 0x99, 0xa6, 0xb5, 0x40,
|
||||
0x48, 0x4d, 0xec, 0x6f, 0x72, 0x6a, 0x01, 0x22, 0xc1, 0x45, 0x6e, 0x06, 0x86, 0x63, 0xf6, 0x89,
|
||||
0xe9, 0xe9, 0xdf, 0xd1, 0x0b, 0x67, 0x50, 0x91, 0x46, 0x49, 0x06, 0x55, 0x06, 0xc6, 0x43, 0x0c,
|
||||
0x10, 0x4f, 0x01, 0xe2, 0xb3, 0x40, 0x0c, 0xaa, 0x52, 0xfe, 0x83, 0x82, 0x0c, 0xaf, 0x45, 0xf8,
|
||||
0x6b, 0xd8, 0x33, 0x5c, 0x40, 0x43, 0x6c, 0x80, 0x38, 0x1f, 0x88, 0x57, 0x01, 0xf1, 0x0b, 0x2c,
|
||||
0xd5, 0xc6, 0x1f, 0x50, 0xc9, 0xee, 0xe4, 0xd1, 0x7a, 0x3d, 0xac, 0x26, 0xf6, 0x27, 0xbc, 0x16,
|
||||
0xa8, 0x05, 0x06, 0x1d, 0xb0, 0x80, 0xc6, 0x59, 0xc3, 0x86, 0xd6, 0xc4, 0xfe, 0x70, 0xf5, 0x6e,
|
||||
0x3e, 0x0f, 0xd4, 0x7c, 0x04, 0x9a, 0x37, 0xd0, 0x0d, 0xfe, 0x00, 0xc4, 0xbb, 0xa1, 0x95, 0xa2,
|
||||
0x2f, 0x03, 0xc3, 0x79, 0x01, 0xa2, 0x6a, 0x01, 0x02, 0x15, 0xdf, 0x6f, 0x68, 0xf0, 0x4c, 0x81,
|
||||
0x04, 0x17, 0x28, 0xd8, 0xc8, 0x4d, 0x2d, 0x58, 0x2c, 0x02, 0x45, 0x2c, 0x28, 0x82, 0x21, 0x11,
|
||||
0x4d, 0x25, 0x80, 0x51, 0xc3, 0xa2, 0x87, 0x2d, 0x35, 0x9b, 0x5b, 0xa4, 0xd5, 0xb0, 0x83, 0x18,
|
||||
0x00, 0x00, 0x06, 0xd3, 0x8e, 0xf0, 0xd7, 0x9a, 0xbb, 0xe9, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45,
|
||||
0x4e, 0x44, 0xae, 0x42, 0x60, 0x82,
|
||||
};
|
||||
|
||||
const BITMAP_OPAQUE add_graphical_segments_xpm[1] = {{ png, sizeof( png ), "add_graphical_segments_xpm" }};
|
||||
|
||||
//EOF
|
|
@ -0,0 +1,67 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
height="26"
|
||||
width="26"
|
||||
version="1.1"
|
||||
id="svg2"
|
||||
inkscape:version="0.48.4 r9939"
|
||||
sodipodi:docname="add_graphical_segments.svg">
|
||||
<metadata
|
||||
id="metadata50">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="999"
|
||||
id="namedview48"
|
||||
showgrid="true"
|
||||
inkscape:zoom="15.807692"
|
||||
inkscape:cx="15.427942"
|
||||
inkscape:cy="9.1441612"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="25"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg2"
|
||||
inkscape:snap-to-guides="false"
|
||||
inkscape:snap-grids="true"
|
||||
showguides="true"
|
||||
inkscape:guide-bbox="true">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid3006"
|
||||
empspacing="5"
|
||||
visible="true"
|
||||
enabled="true"
|
||||
snapvisiblegridlinesonly="true" />
|
||||
</sodipodi:namedview>
|
||||
<defs
|
||||
id="defs4" />
|
||||
<path
|
||||
style="fill:#8181f5;stroke:#0000c8;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none;fill-opacity:1"
|
||||
d="M 4,4 17.5,5.5 22,18 4,22 z"
|
||||
id="path2989"
|
||||
inkscape:connector-curvature="0" />
|
||||
</svg>
|
After Width: | Height: | Size: 2.0 KiB |
|
@ -0,0 +1,103 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
height="26"
|
||||
width="26"
|
||||
version="1.1"
|
||||
id="svg2"
|
||||
inkscape:version="0.48.4 r9939"
|
||||
sodipodi:docname="add_polygon.svg">
|
||||
<metadata
|
||||
id="metadata50">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="999"
|
||||
id="namedview48"
|
||||
showgrid="true"
|
||||
inkscape:zoom="31.615385"
|
||||
inkscape:cx="13"
|
||||
inkscape:cy="13"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="25"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg2"
|
||||
inkscape:snap-to-guides="false"
|
||||
inkscape:snap-grids="true"
|
||||
showguides="true"
|
||||
inkscape:guide-bbox="true">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid3006"
|
||||
empspacing="5"
|
||||
visible="true"
|
||||
enabled="true"
|
||||
snapvisiblegridlinesonly="true" />
|
||||
</sodipodi:namedview>
|
||||
<defs
|
||||
id="defs4" />
|
||||
<path
|
||||
style="fill:none;stroke:#0000c8;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
|
||||
d="M 4,4 17.5,5.5 22,18 4,22"
|
||||
id="path2989"
|
||||
inkscape:connector-curvature="0" />
|
||||
<rect
|
||||
style="fill:#2ac23c;fill-opacity:1;fill-rule:evenodd;stroke:#666666;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
id="rect3776"
|
||||
width="5"
|
||||
height="5.0000005"
|
||||
x="1.5"
|
||||
y="1.4999995"
|
||||
ry="2.5"
|
||||
rx="2.5" />
|
||||
<rect
|
||||
rx="2.5"
|
||||
ry="2.5"
|
||||
y="19.5"
|
||||
x="1.5"
|
||||
height="5.0000005"
|
||||
width="5"
|
||||
id="rect3761"
|
||||
style="fill:#2ac23c;fill-opacity:1;fill-rule:evenodd;stroke:#666666;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||
<rect
|
||||
rx="2.5"
|
||||
ry="2.5"
|
||||
y="15.5"
|
||||
x="19.5"
|
||||
height="5.0000005"
|
||||
width="5"
|
||||
id="rect2990"
|
||||
style="fill:#2ac23c;fill-opacity:1;fill-rule:evenodd;stroke:#666666;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||
<rect
|
||||
style="fill:#2ac23c;fill-opacity:1;fill-rule:evenodd;stroke:#666666;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
id="rect2992"
|
||||
width="5"
|
||||
height="5.0000005"
|
||||
x="15"
|
||||
y="2.9999995"
|
||||
ry="2.5"
|
||||
rx="2.5" />
|
||||
</svg>
|
After Width: | Height: | Size: 3.1 KiB |
|
@ -41,6 +41,8 @@ EXTERN_BITMAP( add_dashed_line_xpm )
|
|||
EXTERN_BITMAP( add_dimension_xpm )
|
||||
EXTERN_BITMAP( add_entry_xpm )
|
||||
EXTERN_BITMAP( add_glabel_xpm )
|
||||
EXTERN_BITMAP( add_graphical_segments_xpm )
|
||||
EXTERN_BITMAP( add_graphical_polygon_xpm )
|
||||
EXTERN_BITMAP( add_hierarchical_label_xpm )
|
||||
EXTERN_BITMAP( add_hierarchical_subsheet_xpm )
|
||||
EXTERN_BITMAP( add_hierar_pin_xpm )
|
||||
|
|
|
@ -335,9 +335,14 @@ void preparePlaceMenu( wxMenu* aParentMenu )
|
|||
KiBitmap( add_circle_xpm ) );
|
||||
|
||||
AddMenuItem( aParentMenu, ID_PCB_ADD_LINE_BUTT,
|
||||
_( "&Line or Polygon" ),
|
||||
_( "Add graphic line or polygon" ),
|
||||
KiBitmap( add_polygon_xpm ) );
|
||||
_( "&Lines" ),
|
||||
_( "Add graphic lines" ),
|
||||
KiBitmap( add_graphical_segments_xpm ) );
|
||||
|
||||
AddMenuItem( aParentMenu, ID_PCB_ADD_POLYGON_BUTT,
|
||||
_( "&Polygons" ),
|
||||
_( "Add graphic polygons" ),
|
||||
KiBitmap( add_graphical_polygon_xpm ) );
|
||||
|
||||
aParentMenu->AppendSeparator();
|
||||
|
||||
|
@ -469,25 +474,12 @@ void prepareEditMenu( wxMenu* aParentMenu, bool aUseGal )
|
|||
_( "&Delete" ), _( "Delete items" ),
|
||||
KiBitmap( delete_xpm ) );
|
||||
|
||||
aParentMenu->AppendSeparator();
|
||||
|
||||
text = AddHotkeyName( _( "&Find" ), g_Pcbnew_Editor_Hokeys_Descr, HK_FIND_ITEM );
|
||||
AddMenuItem( aParentMenu, ID_FIND_ITEMS, text, HELP_FIND , KiBitmap( find_xpm ) );
|
||||
|
||||
aParentMenu->AppendSeparator();
|
||||
|
||||
if( aUseGal )
|
||||
{
|
||||
text = AddHotkeyName( _( "&Cut" ), g_Pcbnew_Editor_Hokeys_Descr, HK_EDIT_CUT );
|
||||
AddMenuItem( aParentMenu, ID_EDIT_CUT, text, _(
|
||||
"Cuts the selected item(s) to the Clipboard" ), KiBitmap( cut_xpm ) );
|
||||
text = AddHotkeyName( _( "&Copy" ), g_Pcbnew_Editor_Hokeys_Descr, HK_EDIT_COPY );
|
||||
AddMenuItem( aParentMenu, ID_EDIT_COPY, text, _(
|
||||
"Copies the selected item(s) to the Clipboard" ), KiBitmap( copy_xpm ) );
|
||||
text = AddHotkeyName( _( "&Paste" ), g_Pcbnew_Editor_Hokeys_Descr, HK_EDIT_PASTE );
|
||||
AddMenuItem( aParentMenu, ID_EDIT_PASTE, text, _(
|
||||
"Pastes item(s) from the Clipboard" ), KiBitmap( paste_xpm ) );
|
||||
aParentMenu->AppendSeparator();
|
||||
}
|
||||
|
||||
AddMenuItem( aParentMenu, ID_PCB_EDIT_ALL_VIAS_AND_TRACK_SIZE,
|
||||
_( "Edit All Tracks and Vias" ), KiBitmap( width_track_via_xpm ) );
|
||||
|
||||
|
@ -526,7 +518,7 @@ void prepareViewMenu( wxMenu* aParentMenu )
|
|||
* From hotkeys, zooming is made around the mouse cursor position
|
||||
* (obviously not possible from the toolbar or menubar command)
|
||||
*
|
||||
* in other words HK_ZOOM_IN and HK_ZOOM_OUT *are NOT* accelerator
|
||||
* in other words HK_ZOOM_IN and HK_ZOOM_OUT *are NOT* accelerators
|
||||
* for Zoom in and Zoom out sub menus
|
||||
*/
|
||||
text = AddHotkeyName( _( "Zoom &In" ), g_Pcbnew_Editor_Hokeys_Descr,
|
||||
|
|
|
@ -33,6 +33,7 @@ enum pcbnew_ids
|
|||
ID_PCB_DRAW_VIA_BUTT,
|
||||
ID_PCB_KEEPOUT_AREA_BUTT,
|
||||
ID_PCB_ADD_LINE_BUTT,
|
||||
ID_PCB_ADD_POLYGON_BUTT,
|
||||
ID_PCB_CIRCLE_BUTT,
|
||||
ID_PCB_ARC_BUTT,
|
||||
ID_PCB_ADD_TEXT_BUTT,
|
||||
|
@ -342,6 +343,7 @@ enum pcbnew_ids
|
|||
ID_MODEDIT_LINE_TOOL,
|
||||
ID_MODEDIT_CIRCLE_TOOL,
|
||||
ID_MODEDIT_ARC_TOOL,
|
||||
ID_MODEDIT_POLYGON_TOOL,
|
||||
ID_MODEDIT_TEXT_TOOL,
|
||||
ID_MODEDIT_ANCHOR_TOOL,
|
||||
ID_MODEDIT_DELETE_TOOL,
|
||||
|
|
|
@ -170,8 +170,8 @@ void FOOTPRINT_EDIT_FRAME::ReCreateVToolbar()
|
|||
_( "Add pad" ), wxITEM_CHECK );
|
||||
|
||||
m_drawToolBar->AddSeparator();
|
||||
m_drawToolBar->AddTool( ID_MODEDIT_LINE_TOOL, wxEmptyString, KiBitmap( add_polygon_xpm ),
|
||||
_( "Add graphic line or polygon" ), wxITEM_CHECK );
|
||||
m_drawToolBar->AddTool( ID_MODEDIT_LINE_TOOL, wxEmptyString, KiBitmap( add_graphical_segments_xpm ),
|
||||
_( "Add graphic line" ), wxITEM_CHECK );
|
||||
|
||||
m_drawToolBar->AddTool( ID_MODEDIT_CIRCLE_TOOL, wxEmptyString, KiBitmap( add_circle_xpm ),
|
||||
_( "Add graphic circle" ), wxITEM_CHECK );
|
||||
|
@ -179,6 +179,9 @@ void FOOTPRINT_EDIT_FRAME::ReCreateVToolbar()
|
|||
m_drawToolBar->AddTool( ID_MODEDIT_ARC_TOOL, wxEmptyString, KiBitmap( add_arc_xpm ),
|
||||
_( "Add graphic arc" ), wxITEM_CHECK );
|
||||
|
||||
m_drawToolBar->AddTool( ID_MODEDIT_POLYGON_TOOL, wxEmptyString, KiBitmap( add_graphical_polygon_xpm ),
|
||||
_( "Add graphic polygon" ), wxITEM_CHECK );
|
||||
|
||||
m_drawToolBar->AddTool( ID_MODEDIT_TEXT_TOOL, wxEmptyString, KiBitmap( text_xpm ),
|
||||
_( "Add Text" ), wxITEM_CHECK );
|
||||
|
||||
|
|
|
@ -452,8 +452,9 @@ void PCB_EDIT_FRAME::ReCreateVToolbar()
|
|||
_( "Add keepout areas" ), wxITEM_CHECK );
|
||||
|
||||
m_drawToolBar->AddSeparator();
|
||||
m_drawToolBar->AddTool( ID_PCB_ADD_LINE_BUTT, wxEmptyString, KiBitmap( add_dashed_line_xpm ),
|
||||
_( "Add graphic line or polygon" ), wxITEM_CHECK );
|
||||
|
||||
m_drawToolBar->AddTool( ID_PCB_ADD_LINE_BUTT, wxEmptyString, KiBitmap( add_graphical_segments_xpm ),
|
||||
_( "Add graphic lines" ), wxITEM_CHECK );
|
||||
|
||||
m_drawToolBar->AddTool( ID_PCB_CIRCLE_BUTT, wxEmptyString, KiBitmap( add_circle_xpm ),
|
||||
_( "Add graphic circle" ), wxITEM_CHECK );
|
||||
|
@ -461,6 +462,9 @@ void PCB_EDIT_FRAME::ReCreateVToolbar()
|
|||
m_drawToolBar->AddTool( ID_PCB_ARC_BUTT, wxEmptyString, KiBitmap( add_arc_xpm ),
|
||||
_( "Add graphic arc" ), wxITEM_CHECK );
|
||||
|
||||
m_drawToolBar->AddTool( ID_PCB_ADD_POLYGON_BUTT, wxEmptyString, KiBitmap( add_graphical_polygon_xpm ),
|
||||
_( "Add graphic polygon" ), wxITEM_CHECK );
|
||||
|
||||
m_drawToolBar->AddTool( ID_PCB_ADD_TEXT_BUTT, wxEmptyString, KiBitmap( text_xpm ),
|
||||
_( "Add text on copper layers or graphic text" ), wxITEM_CHECK );
|
||||
|
||||
|
|
|
@ -68,6 +68,10 @@ TOOL_ACTION PCB_ACTIONS::drawLine( "pcbnew.InteractiveDrawing.line",
|
|||
AS_GLOBAL, 0,
|
||||
_( "Draw Line" ), _( "Draw a line" ), NULL, AF_ACTIVATE );
|
||||
|
||||
TOOL_ACTION PCB_ACTIONS::drawGraphicPolygon( "pcbnew.InteractiveDrawing.graphicPolygon",
|
||||
AS_GLOBAL, 0,
|
||||
_( "Draw Graphic Polygon" ), _( "Draw a graphic polygon" ), NULL, AF_ACTIVATE );
|
||||
|
||||
TOOL_ACTION PCB_ACTIONS::drawCircle( "pcbnew.InteractiveDrawing.circle",
|
||||
AS_GLOBAL, 0,
|
||||
_( "Draw Circle" ), _( "Draw a circle" ), NULL, AF_ACTIVATE );
|
||||
|
@ -668,6 +672,15 @@ int DRAWING_TOOL::DrawZoneCutout( const TOOL_EVENT& aEvent )
|
|||
return drawZone( false, ZONE_MODE::CUTOUT );
|
||||
}
|
||||
|
||||
int DRAWING_TOOL::DrawGraphicPolygon( const TOOL_EVENT& aEvent )
|
||||
{
|
||||
SCOPED_DRAW_MODE scopedDrawMode( m_mode, MODE::GRAPHIC_POLYGON );
|
||||
|
||||
m_frame->SetToolID( ID_PCB_ADD_POLYGON_BUTT, wxCURSOR_PENCIL, _( "Add graphic polygon" ) );
|
||||
|
||||
return drawZone( false, ZONE_MODE::GRAPHIC_POLYGON );
|
||||
}
|
||||
|
||||
|
||||
int DRAWING_TOOL::DrawSimilarZone( const TOOL_EVENT& aEvent )
|
||||
{
|
||||
|
@ -1207,7 +1220,7 @@ bool DRAWING_TOOL::getSourceZoneForAction( ZONE_MODE aMode, ZONE_CONTAINER*& aZo
|
|||
aZone = nullptr;
|
||||
|
||||
// not an action that needs a source zone
|
||||
if( aMode == ZONE_MODE::ADD )
|
||||
if( aMode == ZONE_MODE::ADD || aMode == ZONE_MODE::GRAPHIC_POLYGON )
|
||||
return true;
|
||||
|
||||
SELECTION_TOOL* selTool = m_toolMgr->GetTool<SELECTION_TOOL>();
|
||||
|
@ -1531,6 +1544,7 @@ int DRAWING_TOOL::DrawVia( const TOOL_EVENT& aEvent )
|
|||
void DRAWING_TOOL::setTransitions()
|
||||
{
|
||||
Go( &DRAWING_TOOL::DrawLine, PCB_ACTIONS::drawLine.MakeEvent() );
|
||||
Go( &DRAWING_TOOL::DrawGraphicPolygon, PCB_ACTIONS::drawGraphicPolygon.MakeEvent() );
|
||||
Go( &DRAWING_TOOL::DrawCircle, PCB_ACTIONS::drawCircle.MakeEvent() );
|
||||
Go( &DRAWING_TOOL::DrawArc, PCB_ACTIONS::drawArc.MakeEvent() );
|
||||
Go( &DRAWING_TOOL::DrawDimension, PCB_ACTIONS::drawDimension.MakeEvent() );
|
||||
|
|
|
@ -77,6 +77,7 @@ public:
|
|||
DIMENSION,
|
||||
KEEPOUT,
|
||||
ZONE,
|
||||
GRAPHIC_POLYGON
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -134,6 +135,7 @@ public:
|
|||
* polyline finishes the drawing.
|
||||
*/
|
||||
int DrawZone( const TOOL_EVENT& aEvent );
|
||||
int DrawGraphicPolygon( const TOOL_EVENT& aEvent );
|
||||
|
||||
int DrawVia( const TOOL_EVENT& aEvent );
|
||||
|
||||
|
@ -185,7 +187,8 @@ private:
|
|||
{
|
||||
ADD, ///< Add a new zone/keepout with fresh settings
|
||||
CUTOUT, ///< Make a cutout to an existing zone
|
||||
SIMILAR ///< Add a new zone with the same settings as an existing one
|
||||
SIMILAR, ///< Add a new zone with the same settings as an existing one
|
||||
GRAPHIC_POLYGON
|
||||
};
|
||||
|
||||
///> Shows the context menu for the drawing tool
|
||||
|
|
|
@ -353,6 +353,12 @@ void GRID_HELPER::computeAnchors( BOARD_ITEM* aItem, const VECTOR2I& aRefPos )
|
|||
break;
|
||||
}
|
||||
|
||||
case S_POLYGON:
|
||||
{
|
||||
// no anchors for the moment
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
origin = dseg->GetStart();
|
||||
|
|
|
@ -68,6 +68,10 @@ boost::optional<TOOL_EVENT> PCB_ACTIONS::TranslateLegacyId( int aId )
|
|||
case ID_MODEDIT_LINE_TOOL:
|
||||
return PCB_ACTIONS::drawLine.MakeEvent();
|
||||
|
||||
case ID_PCB_ADD_POLYGON_BUTT:
|
||||
case ID_MODEDIT_POLYGON_TOOL:
|
||||
return PCB_ACTIONS::drawGraphicPolygon.MakeEvent();
|
||||
|
||||
case ID_PCB_CIRCLE_BUTT:
|
||||
case ID_MODEDIT_CIRCLE_TOOL:
|
||||
return PCB_ACTIONS::drawCircle.MakeEvent();
|
||||
|
|
|
@ -132,6 +132,9 @@ public:
|
|||
/// Activation of the drawing tool (line)
|
||||
static TOOL_ACTION drawLine;
|
||||
|
||||
// Activation of the drawing tool (graphic polygons)
|
||||
static TOOL_ACTION drawGraphicPolygon;
|
||||
|
||||
/// Activation of the drawing tool (circle)
|
||||
static TOOL_ACTION drawCircle;
|
||||
|
||||
|
@ -288,6 +291,9 @@ public:
|
|||
/// Activation of the drawing tool (placing a PAD)
|
||||
static TOOL_ACTION placePad;
|
||||
|
||||
static TOOL_ACTION createPadFromShapes;
|
||||
static TOOL_ACTION explodePadToShapes;
|
||||
|
||||
/// Tool for quick pad enumeration
|
||||
static TOOL_ACTION enumeratePads;
|
||||
|
||||
|
|
|
@ -79,9 +79,50 @@ enum DIMENSION_POINTS
|
|||
DIM_FEATUREDO,
|
||||
};
|
||||
|
||||
|
||||
class EDIT_POINTS_FACTORY
|
||||
{
|
||||
private:
|
||||
|
||||
static void buildForPolyOutline( std::shared_ptr<EDIT_POINTS> points, const SHAPE_POLY_SET* aOutline, KIGFX::GAL* aGal )
|
||||
{
|
||||
|
||||
int cornersCount = aOutline->TotalVertices();
|
||||
|
||||
for( auto iterator = aOutline->CIterateWithHoles(); iterator; iterator++ )
|
||||
{
|
||||
points->AddPoint( *iterator );
|
||||
|
||||
if( iterator.IsEndContour() )
|
||||
points->AddBreak();
|
||||
}
|
||||
|
||||
// Lines have to be added after creating edit points,
|
||||
// as they use EDIT_POINT references
|
||||
for( int i = 0; i < cornersCount - 1; ++i )
|
||||
{
|
||||
if( points->IsContourEnd( i ) )
|
||||
{
|
||||
points->AddLine( points->Point( i ),
|
||||
points->Point( points->GetContourStartIdx( i ) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
points->AddLine( points->Point( i ), points->Point( i + 1 ) );
|
||||
}
|
||||
|
||||
points->Line( i ).SetConstraint( new EC_SNAPLINE( points->Line( i ),
|
||||
std::bind( &KIGFX::GAL::GetGridPoint, aGal, _1 ) ) );
|
||||
}
|
||||
|
||||
// The last missing line, connecting the last and the first polygon point
|
||||
points->AddLine( points->Point( cornersCount - 1 ),
|
||||
points->Point( points->GetContourStartIdx( cornersCount - 1 ) ) );
|
||||
|
||||
points->Line( points->LinesSize() - 1 ).SetConstraint(
|
||||
new EC_SNAPLINE( points->Line( points->LinesSize() - 1 ),
|
||||
std::bind( &KIGFX::GAL::GetGridPoint, aGal, _1 ) ) );
|
||||
}
|
||||
|
||||
public:
|
||||
static std::shared_ptr<EDIT_POINTS> Make( EDA_ITEM* aItem, KIGFX::GAL* aGal )
|
||||
{
|
||||
|
@ -122,6 +163,12 @@ public:
|
|||
points->AddPoint( segment->GetEnd() );
|
||||
break;
|
||||
|
||||
case S_POLYGON:
|
||||
{
|
||||
buildForPolyOutline( points, &segment->GetPolyShape(), aGal );
|
||||
break;
|
||||
}
|
||||
|
||||
default: // suppress warnings
|
||||
break;
|
||||
}
|
||||
|
@ -131,44 +178,8 @@ public:
|
|||
|
||||
case PCB_ZONE_AREA_T:
|
||||
{
|
||||
const SHAPE_POLY_SET* outline;
|
||||
outline = static_cast<const ZONE_CONTAINER*>( aItem )->Outline();
|
||||
|
||||
int cornersCount = outline->TotalVertices();
|
||||
|
||||
for( auto iterator = outline->CIterateWithHoles(); iterator; iterator++ )
|
||||
{
|
||||
points->AddPoint( *iterator );
|
||||
|
||||
if( iterator.IsEndContour() )
|
||||
points->AddBreak();
|
||||
}
|
||||
|
||||
// Lines have to be added after creating edit points,
|
||||
// as they use EDIT_POINT references
|
||||
for( int i = 0; i < cornersCount - 1; ++i )
|
||||
{
|
||||
if( points->IsContourEnd( i ) )
|
||||
{
|
||||
points->AddLine( points->Point( i ),
|
||||
points->Point( points->GetContourStartIdx( i ) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
points->AddLine( points->Point( i ), points->Point( i + 1 ) );
|
||||
}
|
||||
|
||||
points->Line( i ).SetConstraint( new EC_SNAPLINE( points->Line( i ),
|
||||
std::bind( &KIGFX::GAL::GetGridPoint, aGal, _1 ) ) );
|
||||
}
|
||||
|
||||
// The last missing line, connecting the last and the first polygon point
|
||||
points->AddLine( points->Point( cornersCount - 1 ),
|
||||
points->Point( points->GetContourStartIdx( cornersCount - 1 ) ) );
|
||||
|
||||
points->Line( points->LinesSize() - 1 ).SetConstraint(
|
||||
new EC_SNAPLINE( points->Line( points->LinesSize() - 1 ),
|
||||
std::bind( &KIGFX::GAL::GetGridPoint, aGal, _1 ) ) );
|
||||
auto zone = static_cast<const ZONE_CONTAINER*>( aItem );
|
||||
buildForPolyOutline( points, zone->Outline(), aGal );
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -455,6 +466,17 @@ void POINT_EDITOR::updateItem() const
|
|||
break;
|
||||
}
|
||||
|
||||
case S_POLYGON:
|
||||
{
|
||||
SHAPE_POLY_SET* outline = &segment->GetPolyShape();
|
||||
|
||||
for( int i = 0; i < outline->TotalVertices(); ++i )
|
||||
{
|
||||
VECTOR2I point = m_editPoints->Point( i ).GetPosition();
|
||||
outline->Vertex( i ) = point;
|
||||
}
|
||||
}
|
||||
|
||||
default: // suppress warnings
|
||||
break;
|
||||
}
|
||||
|
@ -908,28 +930,43 @@ int POINT_EDITOR::removeCorner( const TOOL_EVENT& aEvent )
|
|||
if( !item )
|
||||
return 0;
|
||||
|
||||
if( item->Type() == PCB_ZONE_AREA_T )
|
||||
SHAPE_POLY_SET *outline = nullptr;
|
||||
|
||||
if( item->Type() == PCB_ZONE_AREA_T)
|
||||
{
|
||||
auto zone = static_cast<ZONE_CONTAINER*>( item );
|
||||
outline = zone->Outline();
|
||||
}
|
||||
else if ( item->Type() == PCB_LINE_T )
|
||||
{
|
||||
auto ds = static_cast<DRAWSEGMENT*>( item );
|
||||
if( ds->GetShape() == S_POLYGON )
|
||||
{
|
||||
outline = &ds->GetPolyShape();
|
||||
}
|
||||
}
|
||||
|
||||
if( !outline )
|
||||
return 0;
|
||||
|
||||
PCB_BASE_FRAME* frame = getEditFrame<PCB_BASE_FRAME>();
|
||||
BOARD_COMMIT commit( frame );
|
||||
|
||||
ZONE_CONTAINER* zone = static_cast<ZONE_CONTAINER*>( item );
|
||||
SHAPE_POLY_SET* zoneOutline = zone->Outline();
|
||||
commit.Modify( zone );
|
||||
commit.Modify( item );
|
||||
|
||||
for( int i = 0; i < zoneOutline->TotalVertices(); ++i )
|
||||
for( int i = 0; i < outline->TotalVertices(); ++i )
|
||||
{
|
||||
if( zoneOutline->Vertex( i ) == m_editedPoint->GetPosition() )
|
||||
if( outline->Vertex( i ) == m_editedPoint->GetPosition() )
|
||||
{
|
||||
zoneOutline->RemoveVertex( i );
|
||||
outline->RemoveVertex( i );
|
||||
setEditedPoint( NULL );
|
||||
commit.Push( _( "Remove a zone corner" ) );
|
||||
commit.Push( _( "Remove a zone/polygon corner" ) );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
updatePoints();
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -25,6 +25,9 @@
|
|||
#include <view/view.h>
|
||||
#include <tool/tool_manager.h>
|
||||
#include <class_zone.h>
|
||||
#include <class_drawsegment.h>
|
||||
#include <class_edge_mod.h>
|
||||
#include <class_pad.h>
|
||||
#include <board_commit.h>
|
||||
#include <pcb_painter.h>
|
||||
|
||||
|
@ -61,6 +64,10 @@ std::unique_ptr<ZONE_CONTAINER> ZONE_CREATE_HELPER::createNewZone( bool aKeepout
|
|||
zoneInfo.m_NetcodeSelection = board.GetHighLightNetCode();
|
||||
zoneInfo.SetIsKeepout( m_params.m_keepout );
|
||||
|
||||
if ( m_params.m_mode != DRAWING_TOOL::ZONE_MODE::GRAPHIC_POLYGON )
|
||||
{
|
||||
// Get the current default settings for zones
|
||||
|
||||
// Show options dialog
|
||||
ZONE_EDIT_T dialogResult;
|
||||
|
||||
|
@ -78,6 +85,7 @@ std::unique_ptr<ZONE_CONTAINER> ZONE_CREATE_HELPER::createNewZone( bool aKeepout
|
|||
{
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
auto newZone = std::make_unique<ZONE_CONTAINER>( &board );
|
||||
|
||||
|
@ -137,17 +145,18 @@ void ZONE_CREATE_HELPER::commitZone( std::unique_ptr<ZONE_CONTAINER> aZone )
|
|||
|
||||
BOARD_COMMIT bCommit( &m_tool );
|
||||
|
||||
if( m_params.m_mode == DRAWING_TOOL::ZONE_MODE::CUTOUT )
|
||||
switch ( m_params.m_mode )
|
||||
{
|
||||
case DRAWING_TOOL::ZONE_MODE::CUTOUT:
|
||||
// For cutouts, subtract from the source
|
||||
bCommit.Modify( m_params.m_sourceZone );
|
||||
performZoneCutout( *m_params.m_sourceZone, *aZone );
|
||||
bCommit.Push( _( "Add a zone cutout" ) );
|
||||
m_params.m_sourceZone->Hatch();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Add the zone as a new board item
|
||||
break;
|
||||
|
||||
case DRAWING_TOOL::ZONE_MODE::ADD:
|
||||
case DRAWING_TOOL::ZONE_MODE::SIMILAR:
|
||||
aZone->Hatch();
|
||||
|
||||
if( !m_params.m_keepout )
|
||||
|
@ -155,6 +164,22 @@ void ZONE_CREATE_HELPER::commitZone( std::unique_ptr<ZONE_CONTAINER> aZone )
|
|||
|
||||
bCommit.Add( aZone.release() );
|
||||
bCommit.Push( _( "Add a zone" ) );
|
||||
break;
|
||||
|
||||
case DRAWING_TOOL::ZONE_MODE::GRAPHIC_POLYGON:
|
||||
{
|
||||
BOARD_ITEM_CONTAINER* parent = frame.GetModel();
|
||||
auto poly = m_tool.m_editModules ? new EDGE_MODULE( (MODULE *) parent ) : new DRAWSEGMENT();
|
||||
|
||||
poly->SetShape ( S_POLYGON );
|
||||
poly->SetLayer( aZone->GetLayer() );
|
||||
poly->SetPolyShape ( *aZone->Outline() );
|
||||
|
||||
bCommit.Add( poly );
|
||||
bCommit.Push( _( "Add a graphical polygon" ) );
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue