kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #17584
[PATCH 2/4] Adjust pin_table.svg for better rendering
This moves most coordinates exactly in the middle of a pixel, allowing a
good mapping to pixels during rasterization, which gives a sharper image.
Thanks to Nick Østergaard.
---
bitmaps_png/cpp_26/pin_table.cpp | 35 ++++---
bitmaps_png/sources/pin_table.svg | 189 ++++++++++++++++++++++++++++----------
2 files changed, 154 insertions(+), 70 deletions(-)
diff --git a/bitmaps_png/cpp_26/pin_table.cpp b/bitmaps_png/cpp_26/pin_table.cpp
index c4677ca..17bbec3 100644
--- a/bitmaps_png/cpp_26/pin_table.cpp
+++ b/bitmaps_png/cpp_26/pin_table.cpp
@@ -8,25 +8,22 @@
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, 0x17, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0xdd, 0x56, 0xcd, 0x0a, 0x82,
- 0x40, 0x10, 0x9e, 0x6b, 0xcf, 0x23, 0xbd, 0x56, 0xcf, 0xe0, 0xbf, 0x4f, 0x10, 0xdd, 0x3a, 0x75,
- 0x12, 0xc1, 0x07, 0x50, 0x7c, 0x80, 0x1e, 0xa0, 0x9b, 0x58, 0xb7, 0x2e, 0x41, 0x14, 0x16, 0x92,
- 0x34, 0xed, 0x88, 0x49, 0x98, 0x87, 0xd9, 0x5d, 0x31, 0x68, 0xe1, 0xc3, 0x99, 0x11, 0xe7, 0xf3,
- 0x9b, 0x9d, 0x1d, 0x16, 0x10, 0x11, 0xa6, 0x00, 0xfc, 0x84, 0xc8, 0x06, 0x98, 0x9b, 0x00, 0xa1,
- 0x40, 0xd1, 0x22, 0xa4,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f6, 0x52, 0xa2, 0x5b, 0x26, 0xd1,
+ 0x6e, 0xf9, 0xd4, 0x2d, 0x56, 0x0c, 0xdc, 0xf2, 0x6e, 0xdb, 0xf6, 0x6c, 0x8c, 0x71, 0x12, 0x20,
+ 0x46, 0xdc, 0xb0, 0x08, 0xb4, 0xd6, 0x8a, 0x80, 0x18, 0xf1, 0x08, 0x1a, 0x89, 0x0e, 0x3e, 0x0c,
+ 0x48, 0xed, 0xb9, 0xbd, 0x8a, 0x48, 0xad, 0x88, 0x9b, 0xba, 0xba, 0xae, 0x03, 0x52, 0x7b, 0x6e,
+ 0xff, 0x46, 0xc4, 0x29, 0x06, 0xb5, 0x22, 0x6e, 0x79, 0xab, 0x15, 0x71, 0x1b, 0x56, 0xad, 0x88,
+ 0x3d, 0xeb, 0x0a, 0x28, 0xe2, 0xcd, 0xba, 0x02, 0x8a, 0x44, 0xa9, 0xcb, 0x56, 0x24, 0x2d, 0x06,
+ 0x55, 0x1f, 0xfd, 0xd4, 0xac, 0xfb, 0xbf, 0xeb, 0xd6, 0x27, 0xf1, 0x02, 0x5a, 0xe5, 0x2b, 0x21,
+ 0xff, 0x90, 0x10, 0x58, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82,
};
const BITMAP_OPAQUE pin_table_xpm[1] = {{ png, sizeof( png ), "pin_table_xpm" }};
diff --git a/bitmaps_png/sources/pin_table.svg b/bitmaps_png/sources/pin_table.svg
index 53591be..122eef0 100644
--- a/bitmaps_png/sources/pin_table.svg
+++ b/bitmaps_png/sources/pin_table.svg
@@ -5,12 +5,39 @@
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:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
viewBox="0 0 26 26"
id="svg2"
version="1.1"
width="26"
- height="26">
+ height="26"
+ inkscape:version="0.48.5 r10040"
+ sodipodi:docname="pin_table.svg">
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1918"
+ inkscape:window-height="1078"
+ id="namedview29"
+ showgrid="true"
+ inkscape:zoom="32"
+ inkscape:cx="20.363987"
+ inkscape:cy="9.3807659"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="0"
+ inkscape:current-layer="svg2">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3357" />
+ </sodipodi:namedview>
<metadata
id="metadata87">
<rdf:RDF>
@@ -93,63 +120,123 @@
id="path3081" />
<path
style="fill:#f9f9f9;stroke:#808080;stroke-width:0.99121374;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
- d="m 11.495607,10.518492 12.961754,0 0,11.985901 -12.961754,0 c 0,-3.9953 0,-7.990602 0,-11.985901 z"
- id="rect3938" />
+ d="m 11.5,10.5 13,0 0,12 -13,0 z"
+ id="rect3938"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccc" />
<g
- transform="translate(0,1)"
- id="g21202">
+ style="stroke:#a40000;stroke-linecap:butt"
+ id="use21207"
+ transform="translate(0.029835,-1)">
<path
- id="path3943"
- d="m 13.023165,13.507009 0.936437,0"
- style="fill:none;stroke:#333333;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ style="fill:none;stroke:#a40000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 12.970165,13.5 2,0.007"
+ id="path21217"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cc" />
<path
- style="fill:none;stroke:#333333;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="m 16.023165,13.507009 1.936437,0"
- id="path21198" />
+ id="path21219"
+ d="m 15.970165,13.5 3,0"
+ style="fill:none;stroke:#a40000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cc" />
<path
- id="path21200"
- d="m 20.023165,13.507009 2.936437,0"
- style="fill:none;stroke:#333333;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ style="fill:none;stroke:#a40000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 19.970165,13.5 2.989437,0.007"
+ id="path21221"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cc" />
</g>
<g
- style="stroke:#a40000"
- id="use21207"
- transform="translate(0,-1)">
+ transform="translate(0.029835,0.99300137)"
+ id="g4166"
+ style="stroke:#a40000;stroke-linecap:butt">
<path
- style="fill:none;stroke:#a40000;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="m 13.023165,13.507009 0.936437,0"
- id="path21217" />
+ sodipodi:nodetypes="cc"
+ inkscape:connector-curvature="0"
+ id="path4168"
+ d="m 12.970165,13.5 2,0.007"
+ style="fill:none;stroke:#333333;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
- id="path21219"
- d="m 16.023165,13.507009 1.936437,0"
- style="fill:none;stroke:#a40000;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ sodipodi:nodetypes="cc"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#333333;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 15.970165,13.5 3,0"
+ id="path4170" />
+ <path
+ sodipodi:nodetypes="cc"
+ inkscape:connector-curvature="0"
+ id="path4172"
+ d="m 19.970165,13.5 2.989437,0.007"
+ style="fill:none;stroke:#333333;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ </g>
+ <g
+ style="stroke:#a40000;stroke-linecap:butt"
+ id="g4198"
+ transform="translate(0.029835,4.9930014)">
+ <path
+ style="fill:none;stroke:#333333;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 12.970165,13.5 2,0.007"
+ id="path4200"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cc" />
+ <path
+ id="path4202"
+ d="m 15.970165,13.5 3,0"
+ style="fill:none;stroke:#333333;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cc" />
+ <path
+ style="fill:none;stroke:#333333;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 19.970165,13.5 2.989437,0.007"
+ id="path4204"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cc" />
+ </g>
+ <g
+ transform="translate(0.029835,2.9930014)"
+ id="g4206"
+ style="stroke:#a40000;stroke-linecap:butt">
+ <path
+ sodipodi:nodetypes="cc"
+ inkscape:connector-curvature="0"
+ id="path4208"
+ d="m 12.970165,13.5 2,0.007"
+ style="fill:none;stroke:#333333;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ sodipodi:nodetypes="cc"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#333333;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 15.970165,13.5 3,0"
+ id="path4210" />
+ <path
+ sodipodi:nodetypes="cc"
+ inkscape:connector-curvature="0"
+ id="path4212"
+ d="m 19.970165,13.5 2.989437,0.007"
+ style="fill:none;stroke:#333333;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ </g>
+ <g
+ transform="translate(0.029835,6.9930014)"
+ id="g4214"
+ style="stroke:#a40000;stroke-linecap:butt">
+ <path
+ sodipodi:nodetypes="cc"
+ inkscape:connector-curvature="0"
+ id="path4216"
+ d="m 12.970165,13.5 2,0.007"
+ style="fill:none;stroke:#333333;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ sodipodi:nodetypes="cc"
+ inkscape:connector-curvature="0"
+ style="fill:none;stroke:#333333;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 15.970165,13.5 3,0"
+ id="path4218" />
<path
- style="fill:none;stroke:#a40000;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="m 20.023165,13.507009 2.936437,0"
- id="path21221" />
+ sodipodi:nodetypes="cc"
+ inkscape:connector-curvature="0"
+ id="path4220"
+ d="m 19.970165,13.5 2.989437,0.007"
+ style="fill:none;stroke:#333333;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
- <use
- x="0"
- y="0"
- xlink:href="#g21202"
- id="use21209"
- transform="translate(0,2)"
- width="100%"
- height="100%" />
- <use
- height="100%"
- width="100%"
- transform="translate(0,4)"
- id="use21211"
- xlink:href="#g21202"
- y="0"
- x="0" />
- <use
- x="0"
- y="0"
- xlink:href="#g21202"
- id="use21213"
- transform="translate(0,6)"
- width="100%"
- height="100%" />
</svg>
Follow ups
References