merge with lp:kicad

This commit is contained in:
Miguel Angel Ajo 2012-06-25 22:51:19 +02:00
commit db427cb2cd
148 changed files with 13840 additions and 10079 deletions

View File

@ -1,11 +1,14 @@
common/netlist_keywords.*
common/netlist_lexer.h
common/pcb_plot_params_lexer.h
include/netlist_lexer.h
eeschema/cmp_library_lexer.h
eeschema/cmp_library_keywords.*
eeschema/template_fieldnames_keywords.*
eeschema/template_fieldnames_lexer.h
pcbnew/dialogs/dialog_freeroute_exchange_help_html.h
pcbnew/pcb_plot_params_keywords.cpp
pcbnew/pcb_plot_params_lexer.h
Makefile
CMakeFiles
CMakeCache.txt
@ -30,3 +33,5 @@ new/sweet_keywords.cpp
new/sweet_lexer.h
bitmaps_png/png*
bitmaps_png/tmp
common/pcb_keywords.cpp
include/pcb_lexer.h

View File

@ -177,7 +177,7 @@ GLuint EDA_3D_CANVAS::CreateDrawGL_List()
// because all boards thickness no not match with this setup:
// double epoxy_width = 1.6; // epoxy width in mm
g_Parm_3D_Visu.m_Epoxy_Width = pcb->GetDesignSettings().m_BoardThickness
g_Parm_3D_Visu.m_Epoxy_Width = pcb->GetDesignSettings().GetBoardThickness()
* g_Parm_3D_Visu.m_BoardScale;
// calculate z position for each layer

View File

@ -80,11 +80,11 @@ else (KICAD_STABLE_VERSION )
endif(KICAD_STABLE_VERSION )
# Nanometers must be enabled when USE_PCBNEW_SEXPR_FILE_FORMAT=ON.
if( USE_PCBNEW_SEXPR_FILE_FORMAT AND NOT USE_PCBNEW_NANOMETRES )
set( TMP "The Pcbnew s-expression file format requires nano-meter internal units to be " )
set( TMP "${TMP} enabled using -DUSE_PCBNEW_NANOMETRES=ON." )
message( FATAL_ERROR ${TMP} )
endif( USE_PCBNEW_SEXPR_FILE_FORMAT AND NOT USE_PCBNEW_NANOMETRES )
#if( USE_PCBNEW_SEXPR_FILE_FORMAT AND NOT USE_PCBNEW_NANOMETRES )
# set( TMP "The Pcbnew s-expression file format requires nano-meter internal units to be " )
# set( TMP "${TMP} enabled using -DUSE_PCBNEW_NANOMETRES=ON." )
# message( FATAL_ERROR ${TMP} )
#endif( USE_PCBNEW_SEXPR_FILE_FORMAT AND NOT USE_PCBNEW_NANOMETRES )
#================================================
# Set flags for GCC.

View File

@ -496,6 +496,7 @@ set( BMAPS_MID
window_close
zip_tool
zip
zone_duplicate
zone_unfill
zoom
zoom_area

View File

@ -0,0 +1,106 @@
/* 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, 0x05, 0x8a, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0xb5, 0x95, 0x7b, 0x4c, 0x53,
0x57, 0x18, 0xc0, 0xbf, 0x16, 0x6c, 0xa1, 0x2d, 0x85, 0x96, 0xd2, 0x42, 0x2d, 0xe5, 0xf6, 0x71,
0x6f, 0x1f, 0x3c, 0x0a, 0x02, 0xe5, 0xa1, 0x2d, 0x2d, 0xe5, 0xa1, 0xb0, 0x29, 0x0e, 0x11, 0xe2,
0x98, 0x8f, 0xf9, 0x16, 0x9c, 0x4f, 0x06, 0xe8, 0x1c, 0x3a, 0x75, 0x8b, 0x9a, 0x0c, 0x33, 0x27,
0xd9, 0x12, 0xa3, 0x59, 0xe6, 0x8c, 0xca, 0x36, 0x70, 0x33, 0xd1, 0xcd, 0x6c, 0x46, 0x9d, 0x3a,
0x35, 0x1a, 0x23, 0x33, 0x9b, 0x8a, 0x32, 0xcc, 0x14, 0x50, 0x1e, 0xbe, 0x26, 0x2f, 0xe5, 0xdb,
0xb9, 0x9d, 0x45, 0x34, 0x2a, 0x98, 0xcd, 0x3f, 0x7e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, 0xf7, 0x3a, 0x93, 0x75, 0xf5, 0x24, 0x9e, 0xe5, 0x79, 0xa2, 0xf1,
0x89, 0x36, 0xfa, 0x0a, 0x7b, 0xa3, 0xff, 0x2b, 0x6c, 0x1c, 0xd2, 0x68, 0x8f, 0xfe, 0x03, 0x4a,
0x94, 0x41, 0xc0, 0x1e, 0x6f, 0x7c, 0x33, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae,
0x42, 0x60, 0x82,
};
const BITMAP_OPAQUE zone_duplicate_xpm[1] = {{ png, sizeof( png ), "zone_duplicate_xpm" }};
//EOF

View File

@ -1,36 +1,181 @@
<svg xmlns="http://www.w3.org/2000/svg" height="48" width="48" version="1.1" viewBox="0 0 48 48">
<defs>
<linearGradient id="c" y2="36.848" gradientUnits="userSpaceOnUse" x2="41.355" gradientTransform="matrix(1.9192,0,0,4.3924,-53.533,-129.5)" y1="32.207" x1="39.182">
<stop stop-color="#fff" offset="0"/>
<stop stop-color="#afadff" offset="1"/>
</linearGradient>
<linearGradient id="d" y2="36.848" gradientUnits="userSpaceOnUse" x2="41.355" gradientTransform="matrix(1.9217,0,0,4.024,-2.8365,-111.93)" y1="32.207" x1="39.182">
<stop stop-color="#fff" offset="0"/>
<stop stop-color="#afadff" offset="1"/>
</linearGradient>
</defs>
<rect opacity=".15234" fill-rule="evenodd" ry="6.0088" height="48.071" width="48.178" y="-.082843" x="-.082843" fill="#b3b3b3"/>
<path d="m15.412 38.774h17.273l-0.00002-32.211h-5.7576l-1.4394 2.9283h-2.8788l-1.439-2.9283h-5.7577v32.211z"/>
<path fill="url(#c)" d="m18.291 35.846h11.515v-26.355h-1.4394l-1.4394 2.9283h-5.758l-1.44-2.928h-1.4394v26.355z"/>
<rect transform="matrix(8.1756e-8,-1,1,9.5856e-8,0,0)" height="2.8788" width="5.8566" y="32.685" x="-18.276" fill="#ff7800"/>
<rect transform="matrix(8.1758e-8,-1,1,9.5854e-8,0,0)" height="2.8789" width="5.8566" y="12.534" x="-18.276" fill="#ff7800"/>
<rect transform="matrix(8.1756e-8,-1,1,9.5856e-8,0,0)" height="2.8788" width="5.8566" y="32.685" x="-27.061" fill="#ff7800"/>
<rect transform="matrix(8.1758e-8,-1,1,9.5854e-8,0,0)" height="2.8789" width="5.8566" y="12.533" x="-27.061" fill="#ff7800"/>
<rect transform="matrix(8.1756e-8,-1,1,9.5856e-8,0,0)" height="2.8788" width="5.8566" y="32.685" x="-35.846" fill="#ff7800"/>
<rect transform="matrix(8.1758e-8,-1,1,9.5854e-8,0,0)" height="2.8789" width="5.8566" y="12.533" x="-35.846" fill="#ff7800"/>
<path fill="#fff" d="m-0.85801 27.129 0.23831-5.9251 12.955 0.06852v5.8566h-13.193z"/>
<path fill="#fff" d="m-0.42124 43.235 0.91305-5.9251 11.843-7.2522v5.8566l-12.756 7.3207z"/>
<path fill="#fff" d="m48.956 27.129-0.23834-5.9251-12.955 0.06852v5.8566h13.193z"/>
<path fill="#fff" d="m-0.42124 5.1672 0.91305 5.9251 11.843 7.2522v-5.8566l-12.756-7.3198z"/>
<path fill="#fff" d="m48.519 43.235-0.91305-5.9251-11.843-7.2522v5.8566l12.756 7.3207z"/>
<path fill="#fff" d="m48.519 5.1672-0.91305 5.9251-11.843 7.2522v-5.8566l12.756-7.3198z"/>
<path d="m66.199 42.237h17.295l-0.00002-29.51h-5.7651l-1.4413 2.6827h-2.8826l-1.4413-2.6827h-5.7651v29.51z"/>
<path fill="url(#d)" d="m69.081 39.554h11.53v-24.144h-1.4413l-1.4413 2.6827h-5.766l-1.441-2.683h-1.4413v24.144z"/>
<rect transform="matrix(8.9356e-8,-1,1,8.7703e-8,0,0)" height="2.8826" width="5.3654" y="83.494" x="-23.458" fill="#d72e2e"/>
<rect transform="matrix(8.9358e-8,-1,1,8.7701e-8,0,0)" height="2.8826" width="5.3654" y="63.316" x="-23.458" fill="#d72e2e"/>
<rect transform="matrix(8.9356e-8,-1,1,8.7703e-8,0,0)" height="2.8826" width="5.3654" y="83.494" x="-31.506" fill="#d72e2e"/>
<rect transform="matrix(8.9358e-8,-1,1,8.7701e-8,0,0)" height="2.8826" width="5.3654" y="63.316" x="-31.506" fill="#d72e2e"/>
<rect transform="matrix(8.9356e-8,-1,1,8.7703e-8,0,0)" height="2.8826" width="5.3654" y="83.494" x="-39.554" fill="#d72e2e"/>
<rect transform="matrix(8.9358e-8,-1,1,8.7701e-8,0,0)" height="2.8826" width="5.3654" y="63.316" x="-39.554" fill="#d72e2e"/>
<path d="m28.849 14.073-7.0793 6.2502h4.5106v7.146h-1.5187v0.03624h-6.5222v-4.3135l-6.4659 6.8457 6.4659 6.8431v-4.3601h8.0409v1.09h0.03751v6.3046h-4.4624l7.082 6.2502 7.0793-6.2502h-4.5106v-7.3946h0.48213v-0.03625h6.5195v4.3135l6.466-6.8457-6.466-6.8431v4.3601h-7.0016v-0.84405h-0.03749v-6.302h4.4624l-7.082-6.2502z" fill-rule="evenodd" stroke="#44a118" stroke-width="1.421" fill="#59d421"/>
<?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="48"
width="48"
version="1.1"
viewBox="0 0 48 48"
id="svg2"
inkscape:version="0.48.1 "
sodipodi:docname="module_ratsnest.svg">
<metadata
id="metadata66">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</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="832"
inkscape:window-height="630"
id="namedview64"
showgrid="false"
inkscape:zoom="9.049115"
inkscape:cx="24.048995"
inkscape:cy="24.047343"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="svg2" />
<defs
id="defs4">
<linearGradient
id="c"
y2="36.848"
gradientUnits="userSpaceOnUse"
x2="41.355"
gradientTransform="matrix(1.9192,0,0,4.3924,-53.533,-129.5)"
y1="32.207"
x1="39.182">
<stop
stop-color="#fff"
offset="0"
id="stop7" />
<stop
stop-color="#afadff"
offset="1"
id="stop9" />
</linearGradient>
<linearGradient
id="d"
y2="36.848"
gradientUnits="userSpaceOnUse"
x2="41.355"
gradientTransform="matrix(1.9217,0,0,4.024,-2.8365,-111.93)"
y1="32.207"
x1="39.182">
<stop
stop-color="#fff"
offset="0"
id="stop12" />
<stop
stop-color="#afadff"
offset="1"
id="stop14" />
</linearGradient>
</defs>
<rect
opacity=".15234"
fill-rule="evenodd"
ry="6.0088"
height="48.071"
width="48.178"
y="-.082843"
x="-.082843"
fill="#b3b3b3"
id="rect16" />
<path
d="m15.412 38.774h17.273l-0.00002-32.211h-5.7576l-1.4394 2.9283h-2.8788l-1.439-2.9283h-5.7577v32.211z"
id="path18" />
<path
fill="url(#c)"
d="m18.291 35.846h11.515v-26.355h-1.4394l-1.4394 2.9283h-5.758l-1.44-2.928h-1.4394v26.355z"
id="path20" />
<rect
transform="matrix(8.1756e-8,-1,1,9.5856e-8,0,0)"
height="2.8788"
width="5.8566"
y="32.685"
x="-18.276"
fill="#ff7800"
id="rect22" />
<rect
transform="matrix(8.1758e-8,-1,1,9.5854e-8,0,0)"
height="2.8789"
width="5.8566"
y="12.534"
x="-18.276"
fill="#ff7800"
id="rect24" />
<rect
transform="matrix(8.1756e-8,-1,1,9.5856e-8,0,0)"
height="2.8788"
width="5.8566"
y="32.685"
x="-27.061"
fill="#ff7800"
id="rect26" />
<rect
transform="matrix(8.1758e-8,-1,1,9.5854e-8,0,0)"
height="2.8789"
width="5.8566"
y="12.533"
x="-27.061"
fill="#ff7800"
id="rect28" />
<rect
transform="matrix(8.1756e-8,-1,1,9.5856e-8,0,0)"
height="2.8788"
width="5.8566"
y="32.685"
x="-35.846"
fill="#ff7800"
id="rect30" />
<rect
transform="matrix(8.1758e-8,-1,1,9.5854e-8,0,0)"
height="2.8789"
width="5.8566"
y="12.533"
x="-35.846"
fill="#ff7800"
id="rect32" />
<path
fill="#fff"
d="m-0.85801 27.129 0.23831-5.9251 12.955 0.06852v5.8566h-13.193z"
id="path34" />
<path
fill="#fff"
d="m-0.42124 43.235 0.91305-5.9251 11.843-7.2522v5.8566l-12.756 7.3207z"
id="path36" />
<path
fill="#fff"
d="m48.956 27.129-0.23834-5.9251-12.955 0.06852v5.8566h13.193z"
id="path38" />
<path
fill="#fff"
d="m-0.42124 5.1672 0.91305 5.9251 11.843 7.2522v-5.8566l-12.756-7.3198z"
id="path40" />
<path
fill="#fff"
d="m48.519 43.235-0.91305-5.9251-11.843-7.2522v5.8566l12.756 7.3207z"
id="path42" />
<path
fill="#fff"
d="m48.519 5.1672-0.91305 5.9251-11.843 7.2522v-5.8566l12.756-7.3198z"
id="path44" />
<path
d="m28.849 14.073-7.0793 6.2502h4.5106v7.146h-1.5187v0.03624h-6.5222v-4.3135l-6.4659 6.8457 6.4659 6.8431v-4.3601h8.0409v1.09h0.03751v6.3046h-4.4624l7.082 6.2502 7.0793-6.2502h-4.5106v-7.3946h0.48213v-0.03625h6.5195v4.3135l6.466-6.8457-6.466-6.8431v4.3601h-7.0016v-0.84405h-0.03749v-6.302h4.4624l-7.082-6.2502z"
fill-rule="evenodd"
stroke="#44a118"
stroke-width="1.421"
fill="#59d421"
id="path62" />
</svg>

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

@ -0,0 +1,106 @@
<?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.1 "
sodipodi:docname="zone_duplicate.svg">
<metadata
id="metadata14">
<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>
<defs
id="defs12" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1280"
inkscape:window-height="968"
id="namedview10"
showgrid="true"
inkscape:snap-grids="false"
inkscape:snap-to-guides="false"
inkscape:zoom="22.045246"
inkscape:cx="10.229885"
inkscape:cy="17.675012"
inkscape:window-x="-4"
inkscape:window-y="-4"
inkscape:window-maximized="1"
inkscape:current-layer="svg2">
<inkscape:grid
type="xygrid"
id="grid2822"
empspacing="5"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true" />
</sodipodi:namedview>
<g
id="g2985"
transform="matrix(0.83978077,0,0,0.84815042,-0.69124775,-0.7771573)">
<path
sodipodi:nodetypes="cccccccc"
style="fill:#007d00"
id="path6"
d="m 11.450509,7.1270774 3.562524,-0.082441 9.990276,10.9576626 c 0.05293,1.047104 -0.0071,1.130791 0.04189,4.064582 l -10.019441,-11.051589 -3.575784,-0.0149 -0.01797,-2.0444647 0.01851,-1.8288549 z"
inkscape:connector-curvature="0" />
<path
sodipodi:nodetypes="csssccsssc"
style="fill:#007d00"
id="path8"
d="M 9.0596737,5.051126 C 6.7778677,5.0151714 5.0156064,6.698637 4.9976291,8.9552772 4.9823952,10.852311 6.687876,12.992986 9.0416964,13.021224 11.215469,13.047302 12.964661,11.28357 12.959922,8.9912318 12.955405,6.8062095 11.233617,5.0151714 9.0596737,5.051126 z M 9.0237193,7.0329386 C 10.273838,7.0149614 11.033723,8.0705407 11.0394,8.9552772 11.047156,10.163971 10.076093,11.024425 9.005742,11.003458 7.8456973,10.980733 7.0234621,10.092348 7.0080391,9.0271864 6.991862,7.8910938 7.8454501,7.0329386 9.0237193,7.0329386 z"
inkscape:connector-curvature="0" />
<path
sodipodi:nodetypes="ccccsssccccc"
style="fill:#007d00;stroke:#294128;stroke-width:0.96542722;stroke-opacity:1"
id="path4-9"
d="m 1.3839749,1.4472304 0,23.0744796 23.1912591,0 -10.903193,-11.798566 c -1.042023,1.518154 -2.486693,2.082365 -4.6159936,2.186179 -3.3635454,0.163989 -5.7785427,-2.746597 -5.7785427,-5.7896391 0,-3.0430985 1.9598634,-5.6142371 5.8133611,-5.7204292 1.9273672,-0.053119 3.2176012,0.9006426 3.9944692,1.856684 l 2.74503,0 8.704553,9.6893333 c 0.0081,-0.931634 0.04224,-8.0151116 0.03973,-13.4980994 l -23.1906671,5.78e-5 z"
inkscape:connector-curvature="0" />
</g>
<g
id="g3790"
transform="translate(-19.961779,-1.0937961)">
<path
d="m 34.437331,11.785553 3.011811,-0.07087 8.362205,9.283465 c 0.07087,0.92126 0,0.992126 0.03543,3.472441 l -8.397638,-9.389764 -3.011811,0 0,-1.736221 0,-1.559055 z"
style="fill:#f91100;fill-opacity:0.68556704;fill-rule:nonzero;stroke:none"
id="2"
inkscape:connector-curvature="0" />
<path
d="m 32.417646,10.013899 c -1.913386,0 -3.366142,1.417323 -3.401575,3.330709 0,1.594489 1.417323,3.437008 3.401575,3.437008 1.84252,0.03543 3.295276,-1.452756 3.295276,-3.401575 0,-1.877953 -1.452756,-3.366142 -3.295276,-3.366142 z m 0,1.700788 c 1.027559,-0.03543 1.665354,0.885827 1.665354,1.629921 0.03543,1.027559 -0.779527,1.736221 -1.700787,1.736221 -0.956693,-0.03543 -1.665355,-0.779528 -1.665355,-1.665355 -0.03543,-0.992126 0.708662,-1.700787 1.700788,-1.700787 z"
style="fill:#f80100;fill-opacity:0.68041232;fill-rule:nonzero;stroke:none"
id="3"
inkscape:connector-curvature="0" />
<path
d="m 25.968827,6.966655 0,19.59449 19.488189,0 -9.141732,-10.02756 c -0.885827,1.27559 -2.090551,1.771654 -3.897638,1.84252 -2.799213,0.141732 -4.854331,-2.30315 -4.854331,-4.889764 0,-2.586615 1.665354,-4.7834654 4.889764,-4.8543315 1.629921,-0.035433 2.692913,0.7440945 3.366142,1.5590555 l 2.303149,0 7.299213,8.220473 c 0,-0.779528 0.03543,-6.80315 0.03543,-11.444883 l -19.488189,0 z"
style="fill:#f70300;fill-opacity:0.68556704;fill-rule:nonzero;stroke:#294128;stroke-width:0.7795276px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="4"
inkscape:connector-curvature="0" />
</g>
<path
style="fill:#000080;fill-rule:evenodd"
inkscape:connector-curvature="0"
id="path4220"
d="m 18.859997,6.2927451 -3.869912,0.040856 5.344997,4.1765139 5.344998,-4.1765139 h -4.008748 c 0,-3.6544494 -1.475086,-5.74270633 -6.820083,-5.74270633 V 3.2012159 c 2.672499,0 4.008748,0.5220642 4.008748,3.0915599 z" />
</svg>

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

@ -121,6 +121,8 @@ set(PCB_COMMON_SRCS
../pcbnew/legacy_plugin.cpp
../pcbnew/kicad_plugin.cpp
pcb_plot_params_keywords.cpp
pcb_keywords.cpp
../pcbnew/pcb_parser.cpp
)
@ -148,6 +150,14 @@ make_lexer(
PCBPLOTPARAMS_T
)
# auto-generate pcbnew_sexpr.h and pcbnew_sexpr.cpp
make_lexer( ${CMAKE_CURRENT_SOURCE_DIR}/pcb.keywords
${PROJECT_SOURCE_DIR}/include/pcb_lexer.h
${CMAKE_CURRENT_SOURCE_DIR}/pcb_keywords.cpp
PCB
)
# The dsntest may not build properly using MS Visual Studio.
if(NOT MSVC)
# This one gets made only when testing.

View File

@ -1,9 +1,10 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2009 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
* Copyright (C) 2009 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr
* Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 2012 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -285,7 +286,7 @@ GRID_TYPE& BASE_SCREEN::GetGrid( size_t aIndex )
}
wxPoint BASE_SCREEN::GetNearestGridPosition( const wxPoint& aPosition,
wxPoint BASE_SCREEN::GetNearestGridPosition( const wxPoint& aPosition,
wxRealPoint* aGridSize ) const
{
wxPoint pt;

View File

@ -3,6 +3,30 @@
* @brief Kicad: Common plot PDF Routines
*/
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 1992-2012 Lorenzo Marcantonio, l.marcantonio@logossrl.com
* Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <fctsys.h>
#include <appl_wxstruct.h>
#include <trigo.h>

View File

@ -19,7 +19,7 @@
/* Plot sheet references
* margin is in mils (1/1000 inch)
*/
void EDA_DRAW_FRAME::PlotWorkSheet( PLOTTER* plotter, BASE_SCREEN* screen )
void EDA_DRAW_FRAME::PlotWorkSheet( PLOTTER* plotter, BASE_SCREEN* screen, int aLineWidth )
{
#define WSTEXTSIZE 50 // Text size in mils
@ -46,10 +46,11 @@ void EDA_DRAW_FRAME::PlotWorkSheet( PLOTTER* plotter, BASE_SCREEN* screen )
#endif
bool italic = false;
bool thickness = 0; //@todo : use current pen
int thickness = aLineWidth;
color = BLACK;
plotter->SetColor( color );
plotter->SetCurrentLineWidth( thickness );
// Plot edge.
ref.x = pageInfo.GetLeftMarginMils() * iusPerMil;

File diff suppressed because it is too large Load Diff

View File

@ -83,7 +83,7 @@ END_EVENT_TABLE()
EDA_DRAW_PANEL::EDA_DRAW_PANEL( EDA_DRAW_FRAME* parent, int id,
const wxPoint& pos, const wxSize& size ) :
wxScrolledWindow( parent, id, pos, size, wxBORDER | wxHSCROLL | wxVSCROLL )
wxScrolledWindow( parent, id, pos, size, wxBORDER | wxHSCROLL | wxVSCROLL | wxALWAYS_SHOW_SB )
{
wxASSERT( parent );

View File

@ -2,6 +2,33 @@
* Functions to draw and plot text on screen
* @file drawtxt.cpp
*/
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr
* Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 2012 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <fctsys.h>
#include <gr_basic.h>
#include <common.h>
@ -526,15 +553,17 @@ void PLOTTER::Text( const wxPoint& aPos,
bool aItalic,
bool aBold )
{
if( aWidth == 0 && aBold ) // Use default values if aWidth == 0
aWidth = GetPenSizeForBold( MIN( aSize.x, aSize.y ) );
int textPensize = aWidth;
if( aWidth >= 0 )
aWidth = Clamp_Text_PenSize( aWidth, aSize, aBold );
if( textPensize == 0 && aBold ) // Use default values if aWidth == 0
textPensize = GetPenSizeForBold( MIN( aSize.x, aSize.y ) );
if( textPensize >= 0 )
textPensize = Clamp_Text_PenSize( aWidth, aSize, aBold );
else
aWidth = -Clamp_Text_PenSize( -aWidth, aSize, aBold );
textPensize = -Clamp_Text_PenSize( -aWidth, aSize, aBold );
SetCurrentLineWidth( aWidth );
SetCurrentLineWidth( textPensize );
if( aColor >= 0 )
@ -543,8 +572,11 @@ void PLOTTER::Text( const wxPoint& aPos,
DrawGraphicText( NULL, NULL, aPos, aColor, aText,
aOrient, aSize,
aH_justify, aV_justify,
aWidth, aItalic,
textPensize, aItalic,
aBold,
NULL,
this );
if( aWidth != textPensize )
SetCurrentLineWidth( aWidth );
}

View File

@ -374,8 +374,13 @@ int DSNLEXER::NeedNUMBER( const char* aExpectation ) throw( IO_ERROR )
*/
static inline bool isSpace( int cc )
{
// make sure int passed to ::isspace() is 0-255
return ::isspace( cc & 0xff );
// Warning: we are using UTF8 char, so values are coded from 0x01 to 0xFF
// isspace( int value ) works fine under Linux,
// but seems use only a 7 bits value under mingw, in comparisons.
// (for instance 0xA0 is seen as 0x20)
// So we need to test if the value is ASCII ( <= 127) and a space ( ' ', \t, \n ... )
// and not just a space:
return ( (unsigned) cc <= 127 ) && ::isspace( cc );
}

View File

@ -1,391 +1,395 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2004 Jean-Pierre Charras, jean-pierre.charras@gipsa-lab.inpg.com
* Copyright (C) 2004-2011 KiCad Developers, see change_log.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/**
* @file eda_text.cpp
* @brief Implementation of base KiCad text object.
*/
#include <eda_text.h>
#include <drawtxt.h>
#include <macros.h> // MAX
#include <trigo.h> // RotatePoint
#include <class_drawpanel.h> // EDA_DRAW_PANEL
// Conversion to application internal units defined at build time.
#if defined( PCBNEW )
#include <class_board_item.h>
#define MILS_TO_IU( x ) ( x * IU_PER_MILS );
#elif defined( EESCHEMA )
#include <sch_item_struct.h>
#define MILS_TO_IU( x ) ( x )
#else
#error "Cannot resolve units formatting due to no definition of EESCHEMA or PCBNEW."
#endif
EDA_TEXT::EDA_TEXT( const wxString& text )
{
m_Size.x = m_Size.y = MILS_TO_IU( DEFAULT_SIZE_TEXT ); // Width and height of font.
m_Orient = 0; // Rotation angle in 0.1 degrees.
m_Attributs = 0;
m_Mirror = false; // display mirror if true
m_HJustify = GR_TEXT_HJUSTIFY_CENTER; // Default horizontal justification is centered.
m_VJustify = GR_TEXT_VJUSTIFY_CENTER; // Default vertical justification is centered.
m_Thickness = 0; // thickness
m_Italic = false; // true = italic shape.
m_Bold = false;
m_MultilineAllowed = false; // Set to true for multiline text.
m_Text = text;
}
EDA_TEXT::EDA_TEXT( const EDA_TEXT& aText )
{
m_Pos = aText.m_Pos;
m_Size = aText.m_Size;
m_Orient = aText.m_Orient;
m_Attributs = aText.m_Attributs;
m_Mirror = aText.m_Mirror;
m_HJustify = aText.m_HJustify;
m_VJustify = aText.m_VJustify;
m_Thickness = aText.m_Thickness;
m_Italic = aText.m_Italic;
m_Bold = aText.m_Bold;
m_MultilineAllowed = aText.m_MultilineAllowed;
m_Text = aText.m_Text;
}
EDA_TEXT::~EDA_TEXT()
{
}
int EDA_TEXT::LenSize( const wxString& aLine ) const
{
return ReturnGraphicTextWidth( aLine, m_Size.x, m_Italic, m_Bold );
}
EDA_RECT EDA_TEXT::GetTextBox( int aLine, int aThickness, bool aInvertY ) const
{
EDA_RECT rect;
wxPoint pos;
wxArrayString* list = NULL;
wxString text = m_Text;
int thickness = ( aThickness < 0 ) ? m_Thickness : aThickness;
if( m_MultilineAllowed )