Browse Source
pcbnew: Draw Ratsnest with arcs to avoid overlap
pcbnew: Draw Ratsnest with arcs to avoid overlap
Adds a toggle button that allows switching between straight lines and curves for the ratsnest lines. Fixes: lp:1766597 * https://bugs.launchpad.net/kicad/+bug/1766597pull/13/head
committed by
Jeff Young
20 changed files with 327 additions and 4 deletions
-
1bitmaps_png/CMakeLists.txt
-
45bitmaps_png/cpp_26/curved_ratsnest.cpp
-
1bitmaps_png/include/bitmaps_png/bitmaps_list.h
-
189bitmaps_png/sources/curved_ratsnest.svg
-
1include/pcb_display_options.h
-
1pcbnew/pcb_display_options.cpp
-
3pcbnew/pcb_edit_frame.cpp
-
1pcbnew/pcb_edit_frame.h
-
1pcbnew/pcb_painter.cpp
-
8pcbnew/pcb_painter.h
-
2pcbnew/pcbnew_config.cpp
-
1pcbnew/pcbnew_id.h
-
17pcbnew/ratsnest.cpp
-
17pcbnew/ratsnest_viewitem.cpp
-
11pcbnew/tool_pcb_editor.cpp
-
10pcbnew/toolbars_update_user_interface.cpp
-
3pcbnew/tools/pcb_actions.cpp
-
1pcbnew/tools/pcb_actions.h
-
17pcbnew/tools/pcbnew_control.cpp
-
1pcbnew/tools/pcbnew_control.h
@ -0,0 +1,45 @@ |
|||
|
|||
/* Do not modify this file, it was automatically generated by the
|
|||
* PNG2cpp CMake script, using a *.png file as input. |
|||
*/ |
|||
|
|||
#include <bitmaps_png/bitmaps_list.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, 0x04, 0x00, 0x00, 0x00, 0x03, 0x43, 0x84, |
|||
0x45, 0x00, 0x00, 0x01, 0xc7, 0x49, 0x44, 0x41, 0x54, 0x38, 0xcb, 0x95, 0x94, 0xbb, 0x4f, 0xc2, |
|||
0x50, 0x14, 0xc6, 0xbf, 0x2a, 0x21, 0x91, 0xd5, 0x8d, 0x38, 0x34, 0xba, 0xa1, 0xb8, 0xd0, 0xc1, |
|||
0x41, 0x01, 0x11, 0x16, 0xf1, 0x1f, 0x70, 0x70, 0xd1, 0x89, 0x38, 0xaa, 0x69, 0xe2, 0xa4, 0x4e, |
|||
0x1a, 0x07, 0x56, 0xcb, 0x66, 0x34, 0xf2, 0x1a, 0x1c, 0xd4, 0xc1, 0x18, 0x12, 0x17, 0x9c, 0x40, |
|||
0x37, 0x95, 0x89, 0xc6, 0xc4, 0x26, 0xb2, 0xc0, 0x40, 0x4c, 0x0c, 0x31, 0xf5, 0xf6, 0x45, 0xef, |
|||
0x6d, 0x0b, 0xea, 0x39, 0xcb, 0xbd, 0x3d, 0xfd, 0xf5, 0x9e, 0x47, 0xbf, 0x0b, 0xfc, 0xd3, 0x4e, |
|||
0x42, 0xf4, 0x6e, 0x04, 0xdc, 0xd0, 0xb7, 0xf5, 0xb8, 0x94, 0x95, 0x54, 0x29, 0xac, 0xef, 0x83, |
|||
0x81, 0x48, 0x29, 0x29, 0x27, 0xe5, 0x48, 0x31, 0x18, 0x20, 0x5b, 0x1e, 0xeb, 0xc8, 0xe1, 0x8a, |
|||
0x78, 0x8e, 0xac, 0x78, 0x3b, 0x2e, 0x36, 0x08, 0x92, 0x35, 0x3f, 0x12, 0x29, 0x96, 0x7b, 0x8a, |
|||
0xaa, 0xa8, 0xe5, 0xde, 0x74, 0x0d, 0x55, 0xb4, 0x70, 0x86, 0x0c, 0x56, 0x88, 0x67, 0xc8, 0xaa, |
|||
0x85, 0x6a, 0xa8, 0xae, 0xc5, 0x2b, 0xaa, 0xa4, 0x8a, 0xaf, 0xd6, 0xc1, 0xdc, 0x92, 0xac, 0x21, |
|||
0x9a, 0x2f, 0x74, 0x91, 0x86, 0x8f, 0x49, 0xcb, 0x87, 0x74, 0xb4, 0x6b, 0x20, 0x77, 0x6a, 0xa2, |
|||
0x69, 0x15, 0xc1, 0x25, 0xfa, 0xd0, 0xe2, 0x9b, 0x47, 0x65, 0x24, 0xae, 0x21, 0x47, 0x24, 0x6e, |
|||
0x43, 0x10, 0x0a, 0x25, 0x3d, 0xbd, 0xc2, 0xf7, 0xd4, 0x17, 0x44, 0x8c, 0x3a, 0xa9, 0x9d, 0x67, |
|||
0x0d, 0xd9, 0x52, 0x4b, 0x3d, 0xe1, 0xa2, 0xff, 0x30, 0x18, 0x08, 0xd5, 0x63, 0xdd, 0x54, 0x53, |
|||
0xc8, 0xfb, 0x67, 0x70, 0x8b, 0x27, 0xcc, 0xd1, 0x48, 0xee, 0x90, 0xd4, 0xd2, 0xe0, 0xdb, 0x7c, |
|||
0x5b, 0xc8, 0x4f, 0x8c, 0xd1, 0x91, 0x07, 0x2c, 0x9b, 0x07, 0x73, 0x58, 0x83, 0x82, 0x63, 0xf8, |
|||
0x6d, 0x44, 0xef, 0xd8, 0x1e, 0x71, 0xc6, 0x78, 0x7c, 0x30, 0xe5, 0x8f, 0xe3, 0x12, 0x35, 0x4c, |
|||
0x52, 0x88, 0x07, 0xb4, 0x81, 0x73, 0x57, 0xf9, 0x9b, 0x78, 0x3f, 0x38, 0xa5, 0xe6, 0xe2, 0x82, |
|||
0x24, 0x32, 0x11, 0x97, 0xed, 0x96, 0x29, 0xc4, 0x03, 0xba, 0x21, 0xd3, 0x71, 0x18, 0x95, 0xd8, |
|||
0x00, 0xe8, 0x9a, 0x4c, 0xdf, 0x85, 0xac, 0x7e, 0x22, 0x3e, 0x0c, 0x72, 0xa4, 0x67, 0x9e, 0x32, |
|||
0x4f, 0xda, 0x93, 0x18, 0x0c, 0x31, 0x8d, 0xa0, 0x12, 0xa3, 0xb1, 0x61, 0x2d, 0x77, 0xd4, 0x62, |
|||
0x63, 0x2e, 0xa8, 0x3f, 0x5c, 0x57, 0xf9, 0x36, 0xb6, 0xef, 0x80, 0xc8, 0x6f, 0xf4, 0x18, 0xeb, |
|||
0x26, 0xe5, 0xed, 0x17, 0x17, 0xa2, 0x63, 0x5c, 0x2b, 0x7c, 0x1f, 0xef, 0xc4, 0x3b, 0xa6, 0xde, |
|||
0x68, 0x3d, 0xb1, 0x7a, 0xa1, 0x6d, 0xb6, 0x52, 0x50, 0x0d, 0xbd, 0x09, 0x79, 0x46, 0x4f, 0x86, |
|||
0x5e, 0xa2, 0x6d, 0x3d, 0x77, 0x87, 0xc7, 0xda, 0x96, 0x74, 0x18, 0x3d, 0x19, 0x88, 0x32, 0x00, |
|||
0x8a, 0x7a, 0x40, 0xba, 0x5e, 0x34, 0x84, 0xd1, 0x0b, 0x65, 0x96, 0xde, 0xa8, 0xb8, 0x76, 0xc3, |
|||
0x88, 0x8d, 0x54, 0x53, 0xd3, 0x13, 0xab, 0x17, 0xbb, 0x51, 0x42, 0x81, 0x89, 0x4b, 0x61, 0xb3, |
|||
0x63, 0xdc, 0x2f, 0x57, 0x18, 0x1b, 0x67, 0xaf, 0xbf, 0xbf, 0xd8, 0x0f, 0x3c, 0x1e, 0x28, 0x8f, |
|||
0xaa, 0xd6, 0xe8, 0xf2, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, |
|||
}; |
|||
|
|||
const BITMAP_OPAQUE curved_ratsnest_xpm[1] = {{ png, sizeof( png ), "curved_ratsnest_xpm" }}; |
|||
|
|||
//EOF
|
|||
@ -0,0 +1,189 @@ |
|||
<?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.92.4 (5da689c313, 2019-01-14)" |
|||
sodipodi:docname="curved_ratsnest.svg" |
|||
inkscape:export-filename="E:\Projects\kicad\bitmaps_png\sources\curved_ratsnest.png" |
|||
inkscape:export-xdpi="193" |
|||
inkscape:export-ydpi="193"> |
|||
<metadata |
|||
id="metadata40"> |
|||
<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:license |
|||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" /> |
|||
</cc:Work> |
|||
<cc:License |
|||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/"> |
|||
<cc:permits |
|||
rdf:resource="http://creativecommons.org/ns#Reproduction" /> |
|||
<cc:permits |
|||
rdf:resource="http://creativecommons.org/ns#Distribution" /> |
|||
<cc:requires |
|||
rdf:resource="http://creativecommons.org/ns#Notice" /> |
|||
<cc:requires |
|||
rdf:resource="http://creativecommons.org/ns#Attribution" /> |
|||
<cc:permits |
|||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" /> |
|||
<cc:requires |
|||
rdf:resource="http://creativecommons.org/ns#ShareAlike" /> |
|||
</cc:License> |
|||
</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="1017" |
|||
id="namedview38" |
|||
showgrid="true" |
|||
inkscape:snap-to-guides="false" |
|||
inkscape:snap-grids="true" |
|||
inkscape:zoom="22.627417" |
|||
inkscape:cx="15.228405" |
|||
inkscape:cy="6.3905024" |
|||
inkscape:window-x="-8" |
|||
inkscape:window-y="-8" |
|||
inkscape:window-maximized="1" |
|||
inkscape:current-layer="layer2" |
|||
showguides="true" |
|||
inkscape:guide-bbox="true" |
|||
inkscape:snap-object-midpoints="false" |
|||
inkscape:snap-others="true" |
|||
inkscape:snap-midpoints="false" |
|||
inkscape:object-nodes="false" |
|||
inkscape:object-paths="false" |
|||
inkscape:snap-bbox="false"> |
|||
<inkscape:grid |
|||
type="xygrid" |
|||
id="grid3017" |
|||
empspacing="2" |
|||
visible="true" |
|||
enabled="true" |
|||
snapvisiblegridlinesonly="true" |
|||
spacingx="0.5" |
|||
spacingy="0.5" |
|||
originx="0" |
|||
originy="0" /> |
|||
</sodipodi:namedview> |
|||
<defs |
|||
id="defs4"> |
|||
<filter |
|||
id="c" |
|||
height="1.3651" |
|||
width="1.2097" |
|||
color-interpolation-filters="sRGB" |
|||
y="-0.18257" |
|||
x="-0.10484"> |
|||
<feGaussianBlur |
|||
stdDeviation="1.5978799" |
|||
id="feGaussianBlur7" /> |
|||
</filter> |
|||
<filter |
|||
id="d" |
|||
height="1.4696" |
|||
width="1.4809999" |
|||
color-interpolation-filters="sRGB" |
|||
y="-0.23481999" |
|||
x="-0.24049"> |
|||
<feGaussianBlur |
|||
stdDeviation="1.5978799" |
|||
id="feGaussianBlur10" /> |
|||
</filter> |
|||
</defs> |
|||
<g |
|||
inkscape:groupmode="layer" |
|||
id="layer2" |
|||
inkscape:label="Bottom"> |
|||
<path |
|||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" |
|||
d="M 5,21 C 2,13 2,13 5,5" |
|||
id="path4198" |
|||
inkscape:connector-curvature="0" |
|||
sodipodi:nodetypes="cc" /> |
|||
<path |
|||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" |
|||
d="M 5,5 C 13,2 13,2 21,5" |
|||
id="path4200" |
|||
inkscape:connector-curvature="0" |
|||
sodipodi:nodetypes="cc" /> |
|||
<path |
|||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" |
|||
d="m 5,5 c 5.019544,3.0117263 7.519506,4.5117034 9.52343,6.523476" |
|||
id="path4202" |
|||
inkscape:connector-curvature="0" |
|||
sodipodi:nodetypes="cc" /> |
|||
<ellipse |
|||
ry="2.6984549" |
|||
rx="2.6875672" |
|||
id="path2992-3" |
|||
style="fill:#e6e6e6;fill-opacity:1;stroke:#1a1a1a;stroke-width:0.69999999;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" |
|||
cx="5" |
|||
cy="5" /> |
|||
<path |
|||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" |
|||
d="m 13,13 8,8" |
|||
id="path4204" |
|||
inkscape:connector-curvature="0" |
|||
sodipodi:nodetypes="cc" /> |
|||
<path |
|||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" |
|||
d="M 21,5 21,21 5,21" |
|||
id="path4206" |
|||
inkscape:connector-curvature="0" /> |
|||
<ellipse |
|||
ry="2.6984549" |
|||
rx="2.6875672" |
|||
id="path2992-3-1" |
|||
style="fill:#e6e6e6;fill-opacity:1;stroke:#1a1a1a;stroke-width:0.69999999;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" |
|||
cx="21" |
|||
cy="5" /> |
|||
<ellipse |
|||
ry="2.6984549" |
|||
rx="2.6875672" |
|||
id="path2992-3-3" |
|||
style="fill:#e6e6e6;fill-opacity:1;stroke:#1a1a1a;stroke-width:0.69999999;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" |
|||
cx="5" |
|||
cy="21" /> |
|||
<ellipse |
|||
ry="2.6984549" |
|||
rx="2.6875672" |
|||
id="path2992-3-0" |
|||
style="fill:#e6e6e6;fill-opacity:1;stroke:#1a1a1a;stroke-width:0.69999999;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" |
|||
cx="21" |
|||
cy="21" /> |
|||
</g> |
|||
<g |
|||
inkscape:groupmode="layer" |
|||
id="layer1" |
|||
inkscape:label="Top" |
|||
sodipodi:insensitive="true" |
|||
style="display:inline"> |
|||
<path |
|||
style="fill:none;stroke:#999999;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" |
|||
d="m 1.5,24.5 23,-23" |
|||
id="path4065" |
|||
inkscape:connector-curvature="0" /> |
|||
</g> |
|||
</svg> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue