Commit e5e21a24 authored by jean-pierre charras's avatar jean-pierre charras

Gerbview:

    Added: in file dialog, multiple file selection.
    Added: Draw mode selector (in left toolbar):
        Raw mode:
            a Gerber image is drawn on screen without buffering.
            Artifacts happen if there are negative items drawn, if more than one
            Gerber file is shown.
        Stacked mode:
            each Geber image is drawn in a buffer and after drawn on screen
            No artifact with negative items.
            Each Gerber image covers previous images.
        OR mode (transparency mode):
            each Geber image is drawn in a buffer and after drawn on screen
            No artifact with negative items.
            Each Gerber image is "ORed" with previous images, like in Pcbnew.
    Try to optimize Draw function in buffered modes.
        (Useful for PC that have problems with "blit" graphic function)
    Fix minor issues.
parents 1cdf342d 8faf1e72
......@@ -4,6 +4,27 @@ KiCad ChangeLog 2010
Please add newer entries at the top, list the date and your name with
email address.
2010-dec-15, UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
================================================================================
Gerbview:
Added: in file dialog, multiple file selection.
Added: Draw mode selector (in left toolbar):
Raw mode:
a Gerber image is drawn on screen without buffering.
Artifacts happen if there are negative items drawn, if more than one
Gerber file is shown.
Stacked mode:
each Geber image is drawn in a buffer and after drawn on screen
No artifact with negative items.
Each Gerber image covers previous images.
OR mode (transparency mode):
each Geber image is drawn in a buffer and after drawn on screen
No artifact with negative items.
Each Gerber image is "ORed" with previous images, like in Pcbnew.
Try to optimize Draw function in buffered modes.
(Useful for PC that have problems with "blit" graphic function)
Fix minor issues.
2010-dec-13 UPDATE Wayne Stambaugh <stambaughw@verizon.net>
================================================================================
* Remove deprecated options and quoted project name option in Doxygen file.
......
......@@ -135,6 +135,9 @@ set(BITMAP_SRCS
Flag.xpm
Fonts.xpm
Footprint_Text.xpm
gbr_select_mode0.xpm
gbr_select_mode1.xpm
gbr_select_mode2.xpm
general_deletions.xpm
general_ratsnet.xpm
GLabel2Label.xpm
......
/* XPM */
const char *gbr_select_mode0_xpm[] = {
/* columns rows colors chars-per-pixel */
"16 16 16 1",
": c #BC9694",
"% c #B43B3C",
"& c #B46A6C",
"* c #643E3C",
"O c #8C8D8C",
"$ c #8C1A1C",
"- c #7C2A2C",
"X c #717071",
"o c None",
". c #4C4E4C",
"= c #BC9A9C",
"+ c #ACAAAC",
"# c #AC0204",
" c #585858",
"@ c #AC1614",
"; c #AC0A0C",
/* pixels */
" ............Xoo",
"X............ oo",
"O.............+o",
"+.............Oo",
"o ............Xo",
"oX............ o",
"@############$.+",
"%#############.O",
"&#############*X",
"=#############- ",
"o;############%o",
"o%############;o",
"o&#############=",
"o:#############&",
"oo;############%",
"oo%############@"
};
/* XPM */
const char *gbr_select_mode1_xpm[] = {
/* columns rows colors chars-per-pixel */
"16 16 16 1",
": c #BC9694",
"; c #4C4604",
"% c #B43B3C",
"= c #246604",
"* c #B46A6C",
"+ c #9CB29C",
"X c None",
"$ c #742A04",
"O c #94B294",
"- c #BC9A9C",
"# c #AC0204",
"& c #047E04",
"@ c #AC1614",
" c #058205",
". c #3C943C",
"o c #6CA56C",
/* pixels */
" .XX",
". XX",
"o OX",
"+ oX",
"X .X",
"X. X",
"@############$ +",
"%#############&o",
"*#############=.",
"-#############; ",
"X#############%X",
"X%#############X",
"X*#############-",
"X:#############*",
"XX#############%",
"XX%############@"
};
/* XPM */
const char *gbr_select_mode2_xpm[] = {
/* columns rows colors chars-per-pixel */
"16 16 16 1",
"$ c #213C2F",
"X c #3C3C94",
"O c #6C6AA4",
"* c #8D3616",
" c #0E1F72",
"; c #B28D96",
"o c None",
". c #040284",
"+ c #A2A89F",
"# c #04562C",
"@ c #38783C",
"- c #BC6B6C",
"% c #599A5F",
"= c #751F14",
"& c #BC4745",
": c #745224",
/* pixels */
" ............Xoo",
"X.............oo",
"O.............+o",
"@############$Oo",
"%#############Xo",
"+@############ o",
"&*===========$ +",
"-*============$O",
";*============$X",
"+&============$ ",
"o&************:+",
"o-*************%",
"o;*************@",
"o+&&&&&&&&&&&&&;",
"oo&&&&&&&&&&&&&-",
"oo-&&&&&&&&&&&&&"
};
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<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: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"
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="F:\kicad-launchpad\testing\bitmaps\sources\gbr_select_mode0.png"
width="16"
height="16"
id="svg11300"
sodipodi:version="0.32"
inkscape:version="0.47 r22583"
sodipodi:docname="gbr_select_mode0.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
version="1.1">
<title
id="title2867">fabrication.svg</title>
<defs
id="defs3">
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 8 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="16 : 8 : 1"
inkscape:persp3d-origin="8 : 5.3333333 : 1"
id="perspective62" />
<linearGradient
inkscape:collect="always"
id="linearGradient2250">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop2252" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop2254" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient2265">
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="0"
id="stop2267" />
<stop
style="stop-color:#000000;stop-opacity:0;"
offset="1"
id="stop2269" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient2257">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop2259" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop2261" />
</linearGradient>
<linearGradient
id="linearGradient3087">
<stop
style="stop-color:#3465a4;stop-opacity:1;"
offset="0"
id="stop3089" />
<stop
id="stop3095"
offset="0"
style="stop-color:#9fbce1;stop-opacity:1;" />
<stop
style="stop-color:#6b95ca;stop-opacity:1;"
offset="0"
id="stop2242" />
<stop
id="stop2244"
offset="0.75"
style="stop-color:#3d6aa5;stop-opacity:1;" />
<stop
style="stop-color:#386eb4;stop-opacity:1;"
offset="1"
id="stop3091" />
</linearGradient>
<linearGradient
id="linearGradient3077">
<stop
style="stop-color:#98a0a9;stop-opacity:1;"
offset="0"
id="stop3079" />
<stop
style="stop-color:#c3d0dd;stop-opacity:1;"
offset="1"
id="stop3081" />
</linearGradient>
<linearGradient
id="linearGradient3061">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3063" />
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="1"
id="stop3065" />
</linearGradient>
<linearGradient
id="linearGradient3049">
<stop
style="stop-color:#b6b6b6;stop-opacity:1;"
offset="0"
id="stop3051" />
<stop
id="stop2262"
offset="0.5"
style="stop-color:#f2f2f2;stop-opacity:1;" />
<stop
style="stop-color:#fafafa;stop-opacity:1;"
offset="0.67612958"
id="stop2264" />
<stop
id="stop2268"
offset="0.84051722"
style="stop-color:#d8d8d8;stop-opacity:1;" />
<stop
id="stop2266"
offset="0.875"
style="stop-color:#f2f2f2;stop-opacity:1;" />
<stop
style="stop-color:#dbdbdb;stop-opacity:1;"
offset="1"
id="stop3053" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient3041">
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="0"
id="stop3043" />
<stop
style="stop-color:#000000;stop-opacity:0;"
offset="1"
id="stop3045" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3041"
id="radialGradient3047"
cx="24.8125"
cy="39.125"
fx="24.8125"
fy="39.125"
r="17.6875"
gradientTransform="matrix(1,0,0,0.374558,0,24.47041)"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3061"
id="linearGradient3067"
x1="50.152931"
y1="-3.6324477"
x2="25.291086"
y2="-4.3002653"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.25783861,0,0,0.2595286,32.155794,28.984379)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3087"
id="linearGradient3093"
x1="9.7503242"
y1="32.28376"
x2="16.915297"
y2="39.443218"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.28963035,0,0,0.22349527,2.044995,37.38192)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2257"
id="linearGradient2263"
x1="12.004697"
y1="35.688461"
x2="10.650805"
y2="33.194965"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.33216589,-0.00670924,0.00869457,0.2563181,1.7338281,36.137935)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2265"
id="linearGradient2271"
x1="14.017542"
y1="36.942543"
x2="15.415793"
y2="38.268368"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.28957395,-0.0044084,0.0057129,0.22345175,1.92189,37.152949)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2250"
id="linearGradient2256"
x1="31.177404"
y1="19.821514"
x2="40.859177"
y2="9.6568537"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.3297737,0,0,0.25447215,1.2083631,36.117783)" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3041"
id="radialGradient2260"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1,0,0,0.374558,0,24.47041)"
cx="24.8125"
cy="39.125"
fx="24.8125"
fy="39.125"
r="17.6875" />
</defs>
<sodipodi:namedview
stroke="#204a87"
fill="#3465a4"
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="0.25490196"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="32"
inkscape:cx="5.730549"
inkscape:cy="8.561168"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:grid-bbox="true"
inkscape:document-units="px"
inkscape:showpageshadow="false"
inkscape:window-width="1280"
inkscape:window-height="968"
inkscape:window-x="-4"
inkscape:window-y="-4"
inkscape:window-maximized="1">
<inkscape:grid
type="xygrid"
id="grid2865"
empspacing="5"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true"
empcolor="#0000ff"
empopacity="0.1372549"
dotted="true" />
</sodipodi:namedview>
<metadata
id="metadata4">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:creator>
<cc:Agent>
<dc:title>Jakub Steiner</dc:title>
</cc:Agent>
</dc:creator>
<dc:source />
<cc:license
rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
<dc:title>fabrication.svg</dc:title>
<dc:subject>
<rdf:Bag />
</dc:subject>
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/publicdomain/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
</cc:License>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer"
transform="translate(0,-32)">
<rect
style="fill:#4d4d4d"
id="rect2932"
width="13.536558"
height="10.298958"
x="-7.8830147"
y="32.956669"
transform="matrix(1,0,0.23919332,0.97097197,0,0)"
rx="0.25089604"
ry="0.38427848"
inkscape:export-filename="F:\kicad-sourceforge\trunk\kicad\bitmaps\sources\layers_manager.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="F:\kicad-sourceforge\trunk\kicad\bitmaps\sources\layers_manager.png"
ry="0.38427848"
rx="0.25089604"
transform="matrix(1,0,0.23919332,0.97097196,0,0)"
y="39.136044"
x="-9.3610802"
height="10.298958"
width="13.536558"
id="rect2878"
style="fill:#aa0000" />
</g>
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<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: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"
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="F:\kicad-launchpad\testing\bitmaps\sources\gbr_select_mode1.png"
width="16"
height="16"
id="svg11300"
sodipodi:version="0.32"
inkscape:version="0.47 r22583"
sodipodi:docname="gbr_select_mode1.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
version="1.1">
<title
id="title2867">fabrication.svg</title>
<defs
id="defs3">
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 8 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="16 : 8 : 1"
inkscape:persp3d-origin="8 : 5.3333333 : 1"
id="perspective62" />
<linearGradient
inkscape:collect="always"
id="linearGradient2250">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop2252" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop2254" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient2265">
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="0"
id="stop2267" />
<stop
style="stop-color:#000000;stop-opacity:0;"
offset="1"
id="stop2269" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient2257">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop2259" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop2261" />
</linearGradient>
<linearGradient
id="linearGradient3087">
<stop
style="stop-color:#3465a4;stop-opacity:1;"
offset="0"
id="stop3089" />
<stop
id="stop3095"
offset="0"
style="stop-color:#9fbce1;stop-opacity:1;" />
<stop
style="stop-color:#6b95ca;stop-opacity:1;"
offset="0"
id="stop2242" />
<stop
id="stop2244"
offset="0.75"
style="stop-color:#3d6aa5;stop-opacity:1;" />
<stop
style="stop-color:#386eb4;stop-opacity:1;"
offset="1"
id="stop3091" />
</linearGradient>
<linearGradient
id="linearGradient3077">
<stop
style="stop-color:#98a0a9;stop-opacity:1;"
offset="0"
id="stop3079" />
<stop
style="stop-color:#c3d0dd;stop-opacity:1;"
offset="1"
id="stop3081" />
</linearGradient>
<linearGradient
id="linearGradient3061">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3063" />
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="1"
id="stop3065" />
</linearGradient>
<linearGradient
id="linearGradient3049">
<stop
style="stop-color:#b6b6b6;stop-opacity:1;"
offset="0"
id="stop3051" />
<stop
id="stop2262"
offset="0.5"
style="stop-color:#f2f2f2;stop-opacity:1;" />
<stop
style="stop-color:#fafafa;stop-opacity:1;"
offset="0.67612958"
id="stop2264" />
<stop
id="stop2268"
offset="0.84051722"
style="stop-color:#d8d8d8;stop-opacity:1;" />
<stop
id="stop2266"
offset="0.875"
style="stop-color:#f2f2f2;stop-opacity:1;" />
<stop
style="stop-color:#dbdbdb;stop-opacity:1;"
offset="1"
id="stop3053" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient3041">
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="0"
id="stop3043" />
<stop
style="stop-color:#000000;stop-opacity:0;"
offset="1"
id="stop3045" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3041"
id="radialGradient3047"
cx="24.8125"
cy="39.125"
fx="24.8125"
fy="39.125"
r="17.6875"
gradientTransform="matrix(1,0,0,0.374558,0,24.47041)"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3061"
id="linearGradient3067"
x1="50.152931"
y1="-3.6324477"
x2="25.291086"
y2="-4.3002653"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.25783861,0,0,0.2595286,32.155794,28.984379)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3087"
id="linearGradient3093"
x1="9.7503242"
y1="32.28376"
x2="16.915297"
y2="39.443218"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.28963035,0,0,0.22349527,2.044995,37.38192)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2257"
id="linearGradient2263"
x1="12.004697"
y1="35.688461"
x2="10.650805"
y2="33.194965"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.33216589,-0.00670924,0.00869457,0.2563181,1.7338281,36.137935)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2265"
id="linearGradient2271"
x1="14.017542"
y1="36.942543"
x2="15.415793"
y2="38.268368"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.28957395,-0.0044084,0.0057129,0.22345175,1.92189,37.152949)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2250"
id="linearGradient2256"
x1="31.177404"
y1="19.821514"
x2="40.859177"
y2="9.6568537"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.3297737,0,0,0.25447215,1.2083631,36.117783)" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3041"
id="radialGradient2260"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1,0,0,0.374558,0,24.47041)"
cx="24.8125"
cy="39.125"
fx="24.8125"
fy="39.125"
r="17.6875" />
</defs>
<sodipodi:namedview
stroke="#204a87"
fill="#3465a4"
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="0.25490196"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="32"
inkscape:cx="5.730549"
inkscape:cy="8.561168"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:grid-bbox="true"
inkscape:document-units="px"
inkscape:showpageshadow="false"
inkscape:window-width="1280"
inkscape:window-height="968"
inkscape:window-x="-4"
inkscape:window-y="-4"
inkscape:window-maximized="1">
<inkscape:grid
type="xygrid"
id="grid2865"
empspacing="5"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true"
empcolor="#0000ff"
empopacity="0.1372549"
dotted="true" />
</sodipodi:namedview>
<metadata
id="metadata4">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:creator>
<cc:Agent>
<dc:title>Jakub Steiner</dc:title>
</cc:Agent>
</dc:creator>
<dc:source />
<cc:license
rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
<dc:title>fabrication.svg</dc:title>
<dc:subject>
<rdf:Bag />
</dc:subject>
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/publicdomain/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
</cc:License>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer"
transform="translate(0,-32)">
<rect
style="fill:#008000"
id="rect2932"
width="13.536558"
height="10.298958"
x="-7.8830147"
y="32.956669"
transform="matrix(1,0,0.23919332,0.97097197,0,0)"
rx="0.25089604"
ry="0.38427848"
inkscape:export-filename="F:\kicad-sourceforge\trunk\kicad\bitmaps\sources\layers_manager.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="F:\kicad-sourceforge\trunk\kicad\bitmaps\sources\layers_manager.png"
ry="0.38427848"
rx="0.25089604"
transform="matrix(1,0,0.23919332,0.97097196,0,0)"
y="39.136044"
x="-9.3610802"
height="10.298958"
width="13.536558"
id="rect2878"
style="fill:#aa0000" />
</g>
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<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: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"
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="F:\kicad-launchpad\testing\bitmaps\sources\gbr_select_mode2.png"
width="16"
height="16"
id="svg11300"
sodipodi:version="0.32"
inkscape:version="0.47 r22583"
sodipodi:docname="gbr_select_mode2.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
version="1.1">
<title
id="title2867">fabrication.svg</title>
<defs
id="defs3">
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 8 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="16 : 8 : 1"
inkscape:persp3d-origin="8 : 5.3333333 : 1"
id="perspective62" />
<linearGradient
id="linearGradient3087">
<stop
style="stop-color:#3465a4;stop-opacity:1;"
offset="0"
id="stop3089" />
<stop
id="stop3095"
offset="0"
style="stop-color:#9fbce1;stop-opacity:1;" />
<stop
style="stop-color:#6b95ca;stop-opacity:1;"
offset="0"
id="stop2242" />
<stop
id="stop2244"
offset="0.75"
style="stop-color:#3d6aa5;stop-opacity:1;" />
<stop
style="stop-color:#386eb4;stop-opacity:1;"
offset="1"
id="stop3091" />
</linearGradient>
<linearGradient
id="linearGradient3077">
<stop
style="stop-color:#98a0a9;stop-opacity:1;"
offset="0"
id="stop3079" />
<stop
style="stop-color:#c3d0dd;stop-opacity:1;"
offset="1"
id="stop3081" />
</linearGradient>
<linearGradient
id="linearGradient3061">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3063" />
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="1"
id="stop3065" />
</linearGradient>
<linearGradient
id="linearGradient3049">
<stop
style="stop-color:#b6b6b6;stop-opacity:1;"
offset="0"
id="stop3051" />
<stop
id="stop2262"
offset="0.5"
style="stop-color:#f2f2f2;stop-opacity:1;" />
<stop
style="stop-color:#fafafa;stop-opacity:1;"
offset="0.67612958"
id="stop2264" />
<stop
id="stop2268"
offset="0.84051722"
style="stop-color:#d8d8d8;stop-opacity:1;" />
<stop
id="stop2266"
offset="0.875"
style="stop-color:#f2f2f2;stop-opacity:1;" />
<stop
style="stop-color:#dbdbdb;stop-opacity:1;"
offset="1"
id="stop3053" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient3041">
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="0"
id="stop3043" />
<stop
style="stop-color:#000000;stop-opacity:0;"
offset="1"
id="stop3045" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3041"
id="radialGradient3047"
cx="24.8125"
cy="39.125"
fx="24.8125"
fy="39.125"
r="17.6875"
gradientTransform="matrix(1,0,0,0.374558,0,24.47041)"
gradientUnits="userSpaceOnUse" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3041"
id="radialGradient2260"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1,0,0,0.374558,0,24.47041)"
cx="24.8125"
cy="39.125"
fx="24.8125"
fy="39.125"
r="17.6875" />
</defs>
<sodipodi:namedview
stroke="#204a87"
fill="#3465a4"
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="0.25490196"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="32"
inkscape:cx="7.0561897"
inkscape:cy="8.4031019"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:grid-bbox="true"
inkscape:document-units="px"
inkscape:showpageshadow="false"
inkscape:window-width="1280"
inkscape:window-height="968"
inkscape:window-x="-4"
inkscape:window-y="-4"
inkscape:window-maximized="1">
<inkscape:grid
type="xygrid"
id="grid2865"
empspacing="5"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true"
empcolor="#0000ff"
empopacity="0.1372549"
dotted="true" />
</sodipodi:namedview>
<metadata
id="metadata4">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:creator>
<cc:Agent>
<dc:title>Jakub Steiner</dc:title>
</cc:Agent>
</dc:creator>
<dc:source />
<cc:license
rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
<dc:title>fabrication.svg</dc:title>
<dc:subject>
<rdf:Bag />
</dc:subject>
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/publicdomain/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
</cc:License>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer"
transform="translate(0,-32)">
<rect
style="fill:#000080"
id="rect2932"
width="13.536558"
height="10.298958"
x="-7.8830147"
y="32.956669"
transform="matrix(1,0,0.23919332,0.97097197,0,0)"
rx="0.25089604"
ry="0.38427848"
inkscape:export-filename="F:\kicad-sourceforge\trunk\kicad\bitmaps\sources\layers_manager.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="F:\kicad-sourceforge\trunk\kicad\bitmaps\sources\layers_manager.png"
ry="0.38427848"
rx="0.25089604"
transform="matrix(1,0,0.23919332,0.97097196,0,0)"
y="36.046356"
x="-8.6220474"
height="10.298958"
width="13.536558"
id="rect2878"
style="fill:#008000;opacity:0.66666667" />
<rect
style="fill:#b90000;opacity:0.64102563999999995;fill-opacity:1"
id="rect3120"
width="13.536557"
height="10.298958"
x="-9.3610792"
y="39.136044"
transform="matrix(1,0,0.23919331,0.97097197,0,0)"
rx="0.25089604"
ry="0.38427848"
inkscape:export-filename="F:\kicad-sourceforge\trunk\kicad\bitmaps\sources\layers_manager.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
</g>
</svg>
EESchema-LIBRARY Version 4/1/2006-10:40:00
#
EESchema-LIBRARY Version 2.3 Date: 09/02/2010 21:35:02
#
# A_1KVA
#
DEF A_1KVA EA 0 10 N Y 1 F N
F0 "EA" -90 200 40 H V C C
F1 "A_1KVA" 0 130 40 H V C C
F0 "EA" -90 200 40 H V C CNN
F1 "A_1KVA" 0 130 40 H V C CNN
DRAW
P 5 0 1 0 0 -30 -20 -50 20 -50 0 -30 0 -30 F
C 20 10 31 0 1 0 N
P 4 0 1 0 50 10 80 10 100 0 100 0 N
P 2 0 0 0 200 -200 200 -200 N
C -20 10 31 0 1 0 N
C 20 10 31 0 1 0 N
S -120 60 120 -60 0 1 0 N
P 4 0 1 0 -100 0 -80 10 -50 10 -50 10 N
P 4 0 1 0 50 10 80 10 100 0 100 0 N
P 5 0 1 0 0 -30 -20 -50 20 -50 0 -30 0 -30 F
X ~ 1 200 0 100 L 10 40 1 1 w
X ~ 2 -200 0 100 R 10 40 1 1 w
X ~ 3 0 -100 50 U 10 50 1 1 I
......@@ -23,16 +22,16 @@ ENDDEF
# C_3x1.5mm2
#
DEF C_3x1.5mm2 EC 0 10 N Y 1 F N
F0 "EC" -170 130 40 H V C C
F1 "C_3x1.5mm2" 0 -100 40 H V C C
F0 "EC" -170 130 40 H V C CNN
F1 "C_3x1.5mm2" 0 -100 40 H V C CNN
DRAW
P 2 0 0 0 200 -200 200 -200 N
C -30 50 10 0 1 0 F
P 3 0 1 0 -130 50 -90 50 -90 50 N
P 3 0 1 0 -110 50 -30 -50 -30 -50 N
P 3 0 1 0 -30 50 50 -50 50 -50 N
P 3 0 1 0 -130 50 -90 50 -90 50 N
P 3 0 1 0 10 50 90 -50 90 -50 N
P 4 0 1 0 -100 0 100 0 100 0 100 0 N
P 2 0 0 0 200 -200 200 -200 N
X ~ 1 200 0 100 L 10 40 1 1 W
X ~ 2 -200 0 100 R 10 40 1 1 w
ENDDRAW
......@@ -41,16 +40,16 @@ ENDDEF
# C_3x2.5mm2
#
DEF C_3x2.5mm2 EC 0 10 N Y 1 F N
F0 "EC" -170 130 40 H V C C
F1 "C_3x2.5mm2" 0 -100 40 H V C C
F0 "EC" -170 130 40 H V C CNN
F1 "C_3x2.5mm2" 0 -100 40 H V C CNN
DRAW
P 2 0 0 0 200 -200 200 -200 N
C -30 50 10 0 1 0 F
P 3 0 1 0 -130 50 -90 50 -90 50 N
P 3 0 1 0 -110 50 -30 -50 -30 -50 N
P 3 0 1 0 -30 50 50 -50 50 -50 N
P 3 0 1 0 -130 50 -90 50 -90 50 N
P 3 0 1 0 10 50 90 -50 90 -50 N
P 4 0 1 0 -100 0 100 0 100 0 100 0 N
P 2 0 0 0 200 -200 200 -200 N
X ~ 1 200 0 100 L 10 40 1 1 W
X ~ 2 -200 0 100 R 10 40 1 1 w
ENDDRAW
......@@ -59,16 +58,16 @@ ENDDEF
# C_3x6mm2
#
DEF C_3x6mm2 EC 0 10 N Y 1 F N
F0 "EC" -170 130 40 H V C C
F1 "C_3x6mm2" 0 -100 40 H V C C
F0 "EC" -170 130 40 H V C CNN
F1 "C_3x6mm2" 0 -100 40 H V C CNN
DRAW
P 2 0 0 0 200 -200 200 -200 N
C -30 50 10 0 1 0 F
P 3 0 1 0 -130 50 -90 50 -90 50 N
P 3 0 1 0 -110 50 -30 -50 -30 -50 N
P 3 0 1 0 -30 50 50 -50 50 -50 N
P 3 0 1 0 -130 50 -90 50 -90 50 N
P 3 0 1 0 10 50 90 -50 90 -50 N
P 4 0 1 0 -100 0 100 0 100 0 100 0 N
P 2 0 0 0 200 -200 200 -200 N
X ~ 1 200 0 100 L 10 40 1 1 W
X ~ 2 -200 0 100 R 10 40 1 1 w
ENDDRAW
......@@ -77,13 +76,13 @@ ENDDEF
# D_06A
#
DEF D_06A ED 0 10 N Y 1 F N
F0 "ED" -160 120 40 H V C C
F1 "D_06A" -100 -80 40 H V C C
F0 "ED" -160 120 40 H V C CNN
F1 "D_06A" -100 -80 40 H V C CNN
DRAW
P 2 0 0 0 200 -200 200 -200 N
P 3 0 1 0 -100 0 60 100 60 100 N
P 3 0 1 0 60 20 100 -20 100 -20 N
P 3 0 1 0 100 20 60 -20 60 -20 N
P 3 0 1 0 -100 0 60 100 60 100 N
P 2 0 0 0 200 -200 200 -200 N
X ~ 1 200 0 120 L 10 40 1 1 W
X ~ 2 -200 0 100 R 10 40 1 1 w
ENDDRAW
......@@ -92,13 +91,13 @@ ENDDEF
# D_10A
#
DEF D_10A ED 0 10 N Y 1 F N
F0 "ED" -160 120 40 H V C C
F1 "D_10A" -100 -80 40 H V C C
F0 "ED" -160 120 40 H V C CNN
F1 "D_10A" -100 -80 40 H V C CNN
DRAW
P 2 0 0 0 200 -200 200 -200 N
P 3 0 1 0 -100 0 60 100 60 100 N
P 3 0 1 0 60 20 100 -20 100 -20 N
P 3 0 1 0 100 20 60 -20 60 -20 N
P 3 0 1 0 -100 0 60 100 60 100 N
P 2 0 0 0 200 -200 200 -200 N
X ~ 1 200 0 120 L 10 40 1 1 W
X ~ 2 -200 0 100 R 10 40 1 1 w
ENDDRAW
......@@ -107,13 +106,13 @@ ENDDEF
# D_16A
#
DEF D_16A ED 0 10 N Y 1 F N
F0 "ED" -160 120 40 H V C C
F1 "D_16A" -100 -80 40 H V C C
F0 "ED" -160 120 40 H V C CNN
F1 "D_16A" -100 -80 40 H V C CNN
DRAW
P 2 0 0 0 200 -200 200 -200 N
P 3 0 1 0 -100 0 60 100 60 100 N
P 3 0 1 0 60 20 100 -20 100 -20 N
P 3 0 1 0 100 20 60 -20 60 -20 N
P 3 0 1 0 -100 0 60 100 60 100 N
P 2 0 0 0 200 -200 200 -200 N
X ~ 1 200 0 120 L 10 40 1 1 W
X ~ 2 -200 0 100 R 10 40 1 1 w
ENDDRAW
......@@ -122,13 +121,13 @@ ENDDEF
# D_32A
#
DEF D_32A ED 0 10 N Y 1 F N
F0 "ED" -160 120 40 H V C C
F1 "D_32A" -100 -80 40 H V C C
F0 "ED" -160 120 40 H V C CNN
F1 "D_32A" -100 -80 40 H V C CNN
DRAW
P 2 0 0 0 200 -200 200 -200 N
P 3 0 1 0 -100 0 60 100 60 100 N
P 3 0 1 0 60 20 100 -20 100 -20 N
P 3 0 1 0 100 20 60 -20 60 -20 N
P 3 0 1 0 -100 0 60 100 60 100 N
P 2 0 0 0 200 -200 200 -200 N
X ~ 1 200 0 120 L 10 40 1 1 W
X ~ 2 -200 0 100 R 10 40 1 1 w
ENDDRAW
......@@ -137,12 +136,12 @@ ENDDEF
# G_Th_3KVA
#
DEF G_Th_3KVA EG 0 10 N Y 1 F N
F0 "EG" -160 120 40 H V C C
F1 "G_Th_3KVA" 0 -120 40 H V C C
F0 "EG" -160 120 40 H V C CNN
F1 "G_Th_3KVA" 0 -120 40 H V C CNN
DRAW
T 0 0 0 70 0 0 0 G Normal 1 C C
P 2 0 0 0 200 -200 200 -200 N
C 0 0 84 0 1 0 N
T 0 0 0 70 0 0 0 G
X ~ 1 200 0 118 L 10 40 1 1 w
ENDDRAW
ENDDEF
......@@ -150,14 +149,14 @@ ENDDEF
# I_25A_LUM
#
DEF I_25A_LUM EI 0 10 N Y 1 F N
F0 "EI" -160 120 40 H V C C
F1 "I_25A_LUM" 0 -100 40 H V C C
F0 "EI" -160 120 40 H V C CNN
F1 "I_25A_LUM" 0 -100 40 H V C CNN
DRAW
P 3 0 1 0 30 20 -30 -20 -30 -20 N
P 4 0 1 0 -20 30 20 -30 20 -30 20 -30 N
P 2 0 0 0 200 -200 200 -200 N
C 0 0 36 0 1 0 N
P 3 0 1 0 -100 0 60 100 60 100 N
P 2 0 0 0 200 -200 200 -200 N
P 3 0 1 0 30 20 -30 -20 -30 -20 N
P 4 0 1 0 -20 30 20 -30 20 -30 20 -30 N
X ~ 1 200 0 120 L 10 40 1 1 W
X ~ 2 -200 0 100 R 10 40 1 1 w
ENDDRAW
......@@ -166,59 +165,59 @@ ENDDEF
# J_40A_30mA
#
DEF J_40A_30mA EJ 0 10 N Y 1 F N
F0 "EJ" -210 180 40 H V C C
F1 "J_40A_30mA" -20 -120 40 H V C C
F0 "EJ" -210 180 40 H V C CNN
F1 "J_40A_30mA" -20 -120 40 H V C CNN
DRAW
P 5 0 0 0 120 20 120 -20 120 -20 120 -20 120 -20 N
P 10 0 1 0 60 80 60 200 80 200 80 220 160 220 180 200 160 180 80 180 80 200 80 200 N
P 5 0 1 0 -140 -60 -100 -60 -100 -60 -100 -60 -100 -60 N
P 3 0 1 0 -140 60 -140 -60 -140 -60 N
P 3 0 1 0 -60 0 100 100 100 100 N
T 0 120 200 20 0 0 0 OFS Normal 1 C C
P 2 0 0 0 200 -200 200 -200 N
P 5 0 0 0 120 20 120 -20 120 -20 120 -20 120 -20 N
A -120 60 20 1799 1 0 1 0 N -140 60 -100 60
P 3 0 1 0 -140 0 -60 0 -60 0 N
P 3 0 1 0 -140 60 -140 -60 -140 -60 N
P 3 0 1 0 -60 0 100 100 100 100 N
P 5 0 1 0 -140 -60 -100 -60 -100 -60 -100 -60 -100 -60 N
P 5 0 1 0 -100 60 -100 -60 -100 -40 -100 -40 -100 -40 N
P 6 0 1 0 -120 80 -120 120 40 120 40 60 40 60 40 60 N
T 0 120 200 20 0 0 0 OFS
P 10 0 1 0 60 80 60 200 80 200 80 220 160 220 180 200 160 180 80 180 80 200 80 200 N
X ~ 1 250 0 130 L 10 40 1 1 W
X ~ 3 250 200 70 L 10 10 1 1 O
X ~ 2 -250 0 110 R 10 40 1 1 w
X ~ 3 250 200 70 L 10 10 1 1 O
ENDDRAW
ENDDEF
#
# O_600VA
#
DEF O_600VA EO 0 10 N Y 1 F N
F0 "EO" -70 120 40 H V C C
F1 "O_600VA" -40 -150 40 H V C C
F0 "EO" -70 120 40 H V C CNN
F1 "O_600VA" -40 -150 40 H V C CNN
DRAW
P 3 0 1 0 -20 -40 -20 -80 -20 -80 N
P 3 0 1 0 -70 -50 -70 -70 -70 -70 N
P 2 0 0 0 200 -200 200 -200 N
C -20 0 31 0 1 0 N
C 20 0 31 0 1 0 N
S -110 40 120 -90 0 1 0 N
P 3 0 1 0 -40 -40 -40 -80 -40 -80 N
P 3 0 1 0 -60 -40 -60 -80 -60 -80 N
P 3 0 1 0 -90 -50 -90 -70 -90 -70 N
P 3 0 1 0 -30 -50 -30 -70 -30 -70 N
P 4 0 1 0 90 -50 90 -70 90 -70 90 -70 N
P 3 0 1 0 40 -40 40 -80 40 -80 N
P 3 0 1 0 -100 0 -50 0 -50 0 N
P 3 0 1 0 80 -40 80 -80 80 -80 N
P 3 0 1 0 -90 -50 -90 -70 -90 -70 N
P 3 0 1 0 -80 -40 -80 -80 -80 -80 N
P 3 0 1 0 -70 -50 -70 -70 -70 -70 N
P 3 0 1 0 -60 -40 -60 -80 -60 -80 N
P 3 0 1 0 -50 -50 -50 -70 -50 -70 N
P 3 0 1 0 -40 -40 -40 -80 -40 -80 N
P 3 0 1 0 -30 -50 -30 -70 -30 -70 N
P 3 0 1 0 -20 -40 -20 -80 -20 -80 N
P 3 0 1 0 -10 -50 -10 -70 -10 -70 N
P 3 0 1 0 60 -40 60 -80 60 -80 N
C -20 0 31 0 1 0 N
P 3 0 1 0 0 -40 0 -80 0 -80 N
P 3 0 1 0 10 -50 10 -70 10 -70 N
P 3 0 1 0 20 -40 20 -80 20 -80 N
P 2 0 0 0 200 -200 200 -200 N
P 5 0 1 0 -100 -60 100 -60 100 -60 100 -60 100 -60 N
P 3 0 1 0 30 -50 30 -70 30 -70 N
P 3 0 1 0 40 -40 40 -80 40 -80 N
P 3 0 1 0 50 -50 50 -70 50 -70 N
P 3 0 1 0 50 0 100 0 100 0 N
P 3 0 1 0 60 -40 60 -80 60 -80 N
P 3 0 1 0 70 -50 70 -70 70 -70 N
C 20 0 31 0 1 0 N
P 3 0 1 0 80 -40 80 -80 80 -80 N
P 3 0 1 0 100 -40 100 -80 100 -80 N
P 3 0 1 0 -50 -50 -50 -70 -50 -70 N
P 3 0 1 0 50 0 100 0 100 0 N
P 3 0 1 0 30 -50 30 -70 30 -70 N
P 3 0 1 0 0 -40 0 -80 0 -80 N
P 4 0 1 0 90 -50 90 -70 90 -70 90 -70 N
P 5 0 1 0 -100 -60 100 -60 100 -60 100 -60 100 -60 N
X ~ 1 200 0 100 L 10 40 1 1 W
X ~ 2 -200 0 100 R 10 40 1 1 w
ENDDRAW
......@@ -227,36 +226,36 @@ ENDDEF
# O_900VA
#
DEF O_900VA EO 0 10 N Y 1 F N
F0 "EO" -70 120 40 H V C C
F1 "O_900VA" -40 -150 40 H V C C
F0 "EO" -70 120 40 H V C CNN
F1 "O_900VA" -40 -150 40 H V C CNN
DRAW
P 3 0 1 0 -20 -40 -20 -80 -20 -80 N
P 3 0 1 0 -70 -50 -70 -70 -70 -70 N
P 2 0 0 0 200 -200 200 -200 N
C -20 0 31 0 1 0 N
C 20 0 31 0 1 0 N
S -110 40 120 -90 0 1 0 N
P 3 0 1 0 -40 -40 -40 -80 -40 -80 N
P 3 0 1 0 -60 -40 -60 -80 -60 -80 N
P 3 0 1 0 -90 -50 -90 -70 -90 -70 N
P 3 0 1 0 -30 -50 -30 -70 -30 -70 N
P 4 0 1 0 90 -50 90 -70 90 -70 90 -70 N
P 3 0 1 0 40 -40 40 -80 40 -80 N
P 3 0 1 0 -100 0 -50 0 -50 0 N
P 3 0 1 0 80 -40 80 -80 80 -80 N
P 3 0 1 0 -90 -50 -90 -70 -90 -70 N
P 3 0 1 0 -80 -40 -80 -80 -80 -80 N
P 3 0 1 0 -70 -50 -70 -70 -70 -70 N
P 3 0 1 0 -60 -40 -60 -80 -60 -80 N
P 3 0 1 0 -50 -50 -50 -70 -50 -70 N
P 3 0 1 0 -40 -40 -40 -80 -40 -80 N
P 3 0 1 0 -30 -50 -30 -70 -30 -70 N
P 3 0 1 0 -20 -40 -20 -80 -20 -80 N
P 3 0 1 0 -10 -50 -10 -70 -10 -70 N
P 3 0 1 0 60 -40 60 -80 60 -80 N
C -20 0 31 0 1 0 N
P 3 0 1 0 0 -40 0 -80 0 -80 N
P 3 0 1 0 10 -50 10 -70 10 -70 N
P 3 0 1 0 20 -40 20 -80 20 -80 N
P 2 0 0 0 200 -200 200 -200 N
P 5 0 1 0 -100 -60 100 -60 100 -60 100 -60 100 -60 N
P 3 0 1 0 30 -50 30 -70 30 -70 N
P 3 0 1 0 40 -40 40 -80 40 -80 N
P 3 0 1 0 50 -50 50 -70 50 -70 N
P 3 0 1 0 50 0 100 0 100 0 N
P 3 0 1 0 60 -40 60 -80 60 -80 N
P 3 0 1 0 70 -50 70 -70 70 -70 N
C 20 0 31 0 1 0 N
P 3 0 1 0 80 -40 80 -80 80 -80 N
P 3 0 1 0 100 -40 100 -80 100 -80 N
P 3 0 1 0 -50 -50 -50 -70 -50 -70 N
P 3 0 1 0 50 0 100 0 100 0 N
P 3 0 1 0 30 -50 30 -70 30 -70 N
P 3 0 1 0 0 -40 0 -80 0 -80 N
P 4 0 1 0 90 -50 90 -70 90 -70 90 -70 N
P 5 0 1 0 -100 -60 100 -60 100 -60 100 -60 100 -60 N
X ~ 1 200 0 100 L 10 40 1 1 W
X ~ 2 -200 0 100 R 10 40 1 1 w
ENDDRAW
......@@ -265,8 +264,8 @@ ENDDEF
# P_10A
#
DEF P_10A EP 0 10 N Y 1 F N
F0 "EP" -160 120 40 H V C C
F1 "P_10A" -80 -140 40 H V C C
F0 "EP" -160 120 40 H V C CNN
F1 "P_10A" -80 -140 40 H V C CNN
DRAW
A 0 0 80 891 -891 0 0 0 N 1 80 1 -80
P 2 0 0 0 200 -200 200 -200 N
......@@ -277,157 +276,157 @@ ENDDEF
# Q_25A_2F2O
#
DEF Q_25A_2F2O EQ 0 10 N Y 1 F N
F0 "EQ" -160 120 40 H V C C
F1 "Q_25A_2F2O" 0 -140 40 H V C C
F0 "EQ" -160 120 40 H V C CNN
F1 "Q_25A_2F2O" 0 -140 40 H V C CNN
DRAW
P 3 0 0 0 20 100 20 60 20 60 N
P 3 0 1 0 -100 0 60 100 60 100 N
T 0 90 150 20 0 0 0 O+F Normal 1 C C
S -100 -30 100 -70 0 0 0 N
P 4 0 0 0 -100 -30 -100 -30 100 -70 100 -70 N
P 3 0 0 0 0 60 0 -60 0 -60 N
P 5 0 1 0 20 60 20 50 100 50 100 50 100 50 N
P 2 0 0 0 200 -200 200 -200 N
P 3 0 0 0 0 60 0 -60 0 -60 N
P 3 0 0 0 20 100 20 60 20 60 N
P 3 0 0 0 40 100 40 90 40 90 N
P 4 0 0 0 -100 -30 -100 -30 100 -70 100 -70 N
P 3 0 1 0 -100 0 60 100 60 100 N
P 5 0 1 0 20 60 20 50 100 50 100 50 100 50 N
P 12 0 1 0 40 100 40 150 50 150 50 160 50 170 120 170 140 150 120 130 60 130 50 130 50 150 50 150 N
T 0 90 150 20 0 0 0 O+F
X ~ 4 200 -50 100 L 10 40 1 1 I
X ~ 3 200 0 120 L 10 40 1 1 U
X ~ 1 -200 0 100 R 10 40 1 1 U
X ~ 2 200 50 100 L 10 40 1 1 U
X ~ 3 200 0 120 L 10 40 1 1 U
X ~ 4 200 -50 100 L 10 40 1 1 I
X ~ 5 200 150 60 L 10 40 1 1 U
X ~ 1 -200 0 100 R 10 40 1 1 U
ENDDRAW
ENDDEF
#
# Q_2A_12O_40KV
#
DEF Q_2A_12O_40KV EQ 0 10 N Y 1 F N
F0 "EQ" -160 120 40 H V C C
F1 "Q_2A_12O_40KV" 0 -730 40 H V C C
F0 "EQ" -160 120 40 H V C CNN
F1 "Q_2A_12O_40KV" 0 -730 40 H V C CNN
DRAW
P 3 0 1 0 0 -580 0 20 0 20 N
P 3 0 1 0 -100 -200 80 -170 80 -170 N
S -100 -580 100 -620 0 0 0 N
P 2 0 0 0 200 -200 200 -200 N
P 4 0 0 0 -100 -580 -100 -580 100 -620 100 -620 N
P 3 0 1 0 -100 -550 80 -520 80 -520 N
P 3 0 1 0 -100 -500 80 -470 80 -470 N
P 3 0 1 0 -100 -300 80 -270 80 -270 N
P 3 0 1 0 -100 -350 80 -320 80 -320 N
P 3 0 1 0 -100 -450 80 -420 80 -420 N
P 3 0 1 0 -100 -400 80 -370 80 -370 N
P 5 0 1 0 -100 0 80 30 80 30 80 30 80 30 N
P 3 0 1 0 -100 -350 80 -320 80 -320 N
P 3 0 1 0 -100 -300 80 -270 80 -270 N
P 3 0 1 0 -100 -250 80 -220 80 -220 N
P 3 0 1 0 -100 -200 80 -170 80 -170 N
P 3 0 1 0 -100 -150 80 -120 80 -120 N
P 3 0 1 0 -100 -450 80 -420 80 -420 N
P 3 0 1 0 -100 -100 80 -70 80 -70 N
P 3 0 1 0 0 -580 0 20 0 20 N
P 5 0 1 0 -100 0 80 30 80 30 80 30 80 30 N
P 6 0 1 0 -100 -50 80 -20 80 -20 80 -20 80 -20 80 -20 N
P 3 0 1 0 -100 -550 80 -520 80 -520 N
P 4 0 0 0 -100 -580 -100 -580 100 -620 100 -620 N
P 2 0 0 0 200 -200 200 -200 N
S -100 -580 100 -620 0 0 0 N
P 3 0 1 0 -100 -250 80 -220 80 -220 N
X ~ 25 200 -600 100 L 10 40 1 1 I
X ~ 24 200 -550 120 L 10 40 1 1 U
X ~ 22 200 -500 120 L 10 40 1 1 U
X ~ 1 -200 0 100 R 10 40 1 1 U
X ~ 2 200 0 120 L 10 40 1 1 U
X ~ 3 -200 -50 100 R 10 50 1 1 U
X ~ 3 -200 -50 100 R 10 50 1 1 U
X ~ 4 200 -50 120 L 10 50 1 1 U
X ~ 5 -200 -100 100 R 10 50 1 1 U
X ~ 6 200 -100 120 L 10 40 1 1 U
X ~ 7 -200 -150 100 R 10 50 1 1 U
X ~ 8 200 -150 120 L 10 40 1 1 U
X ~ 9 -200 -200 100 R 10 50 1 1 U
X ~ 10 200 -200 120 L 10 40 1 1 U
X ~ 20 200 -450 120 L 10 40 1 1 U
X ~ 18 200 -400 120 L 10 40 1 1 U
X ~ 16 200 -350 120 L 10 40 1 1 U
X ~ 14 200 -300 120 L 10 40 1 1 U
X ~ 11 -200 -250 100 R 10 50 1 1 U
X ~ 21 -200 -500 100 R 10 50 1 1 U
X ~ 12 200 -250 120 L 10 40 1 1 U
X ~ 10 200 -200 120 L 10 40 1 1 U
X ~ 8 200 -150 120 L 10 40 1 1 U
X ~ 6 200 -100 120 L 10 40 1 1 U
X ~ 4 200 -50 120 L 10 50 1 1 U
X ~ 2 200 0 120 L 10 40 1 1 U
X ~ 22 200 -500 120 L 10 40 1 1 U
X ~ 13 -200 -300 100 R 10 50 1 1 U
X ~ 23 -200 -550 100 R 10 50 1 1 U
X ~ 21 -200 -500 100 R 10 50 1 1 U
X ~ 19 -200 -450 100 R 10 50 1 1 U
X ~ 17 -200 -400 100 R 10 50 1 1 U
X ~ 14 200 -300 120 L 10 40 1 1 U
X ~ 24 200 -550 120 L 10 40 1 1 U
X ~ 15 -200 -350 100 R 10 50 1 1 U
X ~ 13 -200 -300 100 R 10 50 1 1 U
X ~ 11 -200 -250 100 R 10 50 1 1 U
X ~ 9 -200 -200 100 R 10 50 1 1 U
X ~ 7 -200 -150 100 R 10 50 1 1 U
X ~ 5 -200 -100 100 R 10 50 1 1 U
X ~ 3 -200 -50 100 R 10 50 1 1 U
X ~ 3 -200 -50 100 R 10 50 1 1 U
X ~ 1 -200 0 100 R 10 40 1 1 U
X ~ 25 200 -600 100 L 10 40 1 1 I
X ~ 16 200 -350 120 L 10 40 1 1 U
X ~ 17 -200 -400 100 R 10 50 1 1 U
X ~ 18 200 -400 120 L 10 40 1 1 U
X ~ 19 -200 -450 100 R 10 50 1 1 U
ENDDRAW
ENDDEF
#
# R_16A_30mA
#
DEF R_16A_30mA ER 0 10 N Y 1 F N
F0 "ER" -210 180 40 H V C C
F1 "R_16A_30mA" 0 -200 40 H V C C
F0 "ER" -210 180 40 H V C CNN
F1 "R_16A_30mA" 0 -200 40 H V C CNN
DRAW
P 3 0 0 0 20 -50 20 50 20 50 N
T 0 20 -100 50 0 0 0 M Normal 1 C C
T 0 120 200 20 0 0 0 OF Normal 1 C C
P 2 0 0 0 200 -200 200 -200 N
P 2 0 0 0 400 -200 400 -200 N
P 3 0 1 0 -60 0 100 100 100 100 N
P 5 0 1 0 -100 60 -100 -60 -100 -40 -100 -40 -100 -40 N
P 3 0 0 0 20 -50 20 50 20 50 N
A -120 60 20 1799 1 0 1 0 N -140 60 -100 60
C 20 -100 50 0 1 0 N
P 2 0 0 0 200 -200 200 -200 N
P 3 0 1 0 -140 0 -60 0 -60 0 N
P 3 0 1 0 -140 60 -140 -60 -140 -60 N
P 3 0 1 0 -60 0 100 100 100 100 N
P 3 0 1 0 140 20 100 -20 100 -20 N
P 4 0 1 0 100 20 140 -20 140 -20 140 -20 N
P 5 0 1 0 -140 -60 -100 -60 -100 -60 -100 -60 -100 -60 N
P 3 0 1 0 -140 60 -140 -60 -140 -60 N
A -120 60 20 1799 1 0 1 0 N -140 60 -100 60
P 10 0 1 0 60 80 60 200 80 200 80 220 160 220 180 200 160 180 80 180 80 200 80 200 N
P 5 0 1 0 -100 60 -100 -60 -100 -40 -100 -40 -100 -40 N
P 6 0 1 0 -120 80 -120 120 40 120 40 60 40 60 40 60 N
P 3 0 1 0 -140 0 -60 0 -60 0 N
T 0 20 -100 50 0 0 0 M
T 0 120 200 20 0 0 0 OF
X ~ 4 250 -100 180 L 10 50 1 1 I
P 10 0 1 0 60 80 60 200 80 200 80 220 160 220 180 200 160 180 80 180 80 200 80 200 N
X ~ 1 250 0 130 L 10 40 1 1 W
X ~ 3 250 200 70 L 10 10 1 1 O
X ~ 2 -250 0 110 R 10 40 1 1 w
X ~ 3 250 200 70 L 10 10 1 1 O
X ~ 4 250 -100 180 L 10 50 1 1 I
ENDDRAW
ENDDEF
#
# S_63A
#
DEF S_63A ES 0 10 N Y 1 F N
F0 "ES" -210 180 40 H V C C
F1 "S_63A" 0 -110 40 H V C C
F0 "ES" -210 180 40 H V C CNN
F1 "S_63A" 0 -110 40 H V C CNN
DRAW
P 5 0 1 0 -140 -60 -100 -60 -100 -60 -100 -60 -100 -60 N
P 3 0 1 0 -140 60 -140 -60 -140 -60 N
P 3 0 0 0 120 20 120 -20 120 -20 N
P 3 0 1 0 -140 60 -100 60 -100 60 N
T 0 120 200 20 0 0 0 OFS Normal 1 C C
P 2 0 0 0 200 -200 200 -200 N
P 2 0 0 0 400 -200 400 -200 N
P 3 0 0 0 -150 0 -100 0 -100 0 N
P 3 0 0 0 120 20 120 -20 120 -20 N
P 3 0 1 0 -140 0 -60 0 -60 0 N
P 3 0 1 0 -140 60 -140 -60 -140 -60 N
P 3 0 1 0 -140 60 -100 60 -100 60 N
P 3 0 1 0 -120 60 -120 80 -120 80 N
P 5 0 1 0 -100 60 -100 -60 -100 -40 -100 -40 -100 -40 N
P 3 0 1 0 -60 0 100 100 100 100 N
P 3 0 1 0 -140 0 -60 0 -60 0 N
P 10 0 1 0 60 80 60 200 80 200 80 220 160 220 180 200 160 180 80 180 80 200 80 200 N
P 5 0 1 0 -140 -60 -100 -60 -100 -60 -100 -60 -100 -60 N
P 5 0 1 0 -100 60 -100 -60 -100 -40 -100 -40 -100 -40 N
P 6 0 1 0 -120 80 -120 120 40 120 40 60 40 60 40 60 N
P 3 0 0 0 -150 0 -100 0 -100 0 N
T 0 120 200 20 0 0 0 OFS
P 10 0 1 0 60 80 60 200 80 200 80 220 160 220 180 200 160 180 80 180 80 200 80 200 N
X ~ 1 250 0 130 L 10 40 1 1 W
X ~ 3 250 200 70 L 10 10 1 1 O
X ~ 2 -250 0 100 R 10 40 1 1 w
X ~ 3 250 200 70 L 10 10 1 1 O
ENDDRAW
ENDDEF
#
# V_A10A
#
DEF V_A10A EV 0 10 N Y 1 F N
F0 "EV" -160 120 40 H V C C
F1 "V_A10A" -60 -140 40 H V C C
F0 "EV" -160 120 40 H V C CNN
F1 "V_A10A" -60 -140 40 H V C CNN
DRAW
P 3 0 1 0 -100 0 -80 0 -80 0 N
C 0 0 84 0 1 0 N
T 0 0 0 70 0 0 0 A Normal 1 C C
P 2 0 0 0 200 -200 200 -200 N
T 0 0 0 70 0 0 0 A
X ~ 2 200 0 118 L 10 40 1 1 w
C 0 0 84 0 1 0 N
P 3 0 1 0 -100 0 -80 0 -80 0 N
X ~ 1 -200 0 100 R 10 40 1 1 W
X ~ 2 200 0 118 L 10 40 1 1 w
ENDDRAW
ENDDEF
#
# V_F50Hz
#
DEF V_F50Hz EV 0 10 N Y 1 F N
F0 "EV" -160 120 40 H V C C
F1 "V_F50Hz" -40 -140 40 H V C C
F0 "EV" -160 120 40 H V C CNN
F1 "V_F50Hz" -40 -140 40 H V C CNN
DRAW
T 0 0 0 50 0 0 0 Hz Normal 1 C C
P 2 0 0 0 200 -200 200 -200 N
C 0 0 84 0 1 0 N
T 0 0 0 50 0 0 0 Hz
X ~ 1 200 0 118 L 10 40 1 1 W
ENDDRAW
ENDDEF
......@@ -435,12 +434,12 @@ ENDDEF
# V_U400V
#
DEF V_U400V EV 0 10 N Y 1 F N
F0 "EV" -160 120 40 H V C C
F1 "V_U400V" -60 -140 40 H V C C
F0 "EV" -160 120 40 H V C CNN
F1 "V_U400V" -60 -140 40 H V C CNN
DRAW
C 0 0 84 0 1 0 N
T 0 0 0 70 0 0 0 V Normal 1 C C
P 2 0 0 0 200 -200 200 -200 N
T 0 0 0 70 0 0 0 V
C 0 0 84 0 1 0 N
X ~ 1 200 0 118 L 10 40 1 1 W
ENDDRAW
ENDDEF
......@@ -448,15 +447,15 @@ ENDDEF
# W_15KA
#
DEF W_15KA EW 0 10 N Y 1 F N
F0 "EW" -160 120 40 H V C C
F1 "W_15KA" -50 -210 40 H V C C
F0 "EW" -160 120 40 H V C CNN
F1 "W_15KA" -50 -210 40 H V C CNN
DRAW
P 7 0 1 0 -80 0 -40 0 -80 40 -80 0 -80 -40 -40 0 -40 0 F
P 8 0 1 0 80 0 40 0 80 40 80 -40 80 0 80 -40 40 0 40 0 F
P 2 0 0 0 200 -200 200 -200 N
S -10 -40 10 -60 0 1 0 N
S -120 60 120 -60 0 1 0 N
S -10 -40 10 -60 0 1 0 N
P 3 0 1 0 -100 0 -80 0 -80 0 N
P 7 0 1 0 -80 0 -40 0 -80 40 -80 0 -80 -40 -40 0 -40 0 F
P 8 0 1 0 80 0 40 0 80 40 80 -40 80 0 80 -40 40 0 40 0 F
X ~ 1 200 0 100 L 10 40 1 1 W
X ~ 2 -200 0 100 R 10 40 1 1 w
X ~ 3 0 -100 50 U 10 50 1 1 O
......@@ -466,19 +465,19 @@ ENDDEF
# Y_ELC
#
DEF Y_ELC EY 0 10 N Y 1 F N
F0 "EY" -10 120 40 H V C C
F1 "Y_ELC" 60 -120 40 H V C C
F0 "EY" -10 120 40 H V C CNN
F1 "Y_ELC" 60 -120 40 H V C CNN
DRAW
P 2 0 0 0 200 -200 200 -200 N
P 3 0 0 0 -50 10 -50 -10 -50 -10 N
P 3 0 0 0 -30 30 -30 -30 -30 -30 N
P 3 0 0 0 -40 20 -40 -20 -40 -20 N
P 3 0 0 0 -30 30 -30 -30 -30 -30 N
P 3 0 0 0 -10 50 -10 -50 -10 -50 N
P 4 0 0 0 -60 0 70 0 80 0 70 0 N
P 4 0 0 0 -20 40 -20 -40 -20 -40 -20 -40 N
P 4 0 0 0 0 60 0 60 0 -60 0 -60 N
P 2 0 0 0 200 -200 200 -200 N
X ~ 1 200 0 118 L 10 40 1 1 W
ENDDRAW
ENDDEF
#
#EndLibrary
#End Library
......@@ -95,7 +95,7 @@ GERBER_IMAGE::GERBER_IMAGE( WinEDA_GerberFrame* aParent, int aLayer )
for( unsigned ii = 0; ii < DIM( m_Aperture_List ); ii++ )
m_Aperture_List[ii] = 0;
m_Pcb = 0;
m_Pcb = aParent->GetBoard();
}
......@@ -151,6 +151,7 @@ void GERBER_IMAGE::ResetDefaultValues()
m_FileName.Empty();
m_ImageName = wxT( "no name" ); // Image name from the IN command
m_ImageNegative = false; // true = Negative image
m_hasNegativeItems = -1; // set to uninitialized
m_ImageJustifyOffset = wxPoint(0,0); // Image justify Offset
m_ImageJustifyXCenter = false; // Image Justify Center on X axis (default = false)
m_ImageJustifyYCenter = false; // Image Justify Center on Y axis (default = false)
......@@ -190,6 +191,35 @@ void GERBER_IMAGE::ResetDefaultValues()
m_Selected_Tool = FIRST_DCODE;
}
/* Function HasNegativeItems
* return true if at least one item must be drawn in background color
* used to optimize screen refresh
*/
bool GERBER_IMAGE::HasNegativeItems()
{
if( m_hasNegativeItems < 0 ) // negative items are not yet searched: find them if any
{
if( m_ImageNegative ) // A negative layer is expected having always negative objects.
m_hasNegativeItems = 1;
else
{
m_hasNegativeItems = 0;
for( BOARD_ITEM* item = m_Pcb->m_Drawings; item; item = item->Next() )
{
GERBER_DRAW_ITEM* gerb_item = (GERBER_DRAW_ITEM*) item;
if( gerb_item->GetLayer() != m_GraphicLayer )
continue;
if( gerb_item->HasNegativeItems() )
{
m_hasNegativeItems = 1;
break;
}
}
// TODO search for items in list
}
}
return m_hasNegativeItems == 1;
}
int GERBER_IMAGE::ReturnUsedDcodeNumber()
{
......
......@@ -128,6 +128,15 @@ public:
APERTURE_MACRO_SET m_aperture_macros; ///< a collection of APERTURE_MACROS, sorted by name
private:
int m_hasNegativeItems; // true if the image is negative or has some negative items
// Used to optimize drawing, because when there are no
// negative items screen refresh does not need
// to build an intermediate bitmap specfic to this image
// -1 = negative items are
// 0 = no negative items found
// 1 = have negative items found
public:
GERBER_IMAGE( WinEDA_GerberFrame* aParent, int layer );
~GERBER_IMAGE();
......@@ -144,6 +153,13 @@ public:
return m_GBRLayerParams;
}
/**
* Function HasNegativeItems
* @return true if at least one item must be drawn in background color
* used to optimize screen refresh (when no items are in background color
* refresh can be faster)
*/
bool HasNegativeItems();
/**
* Function ReportMessage
......
......@@ -738,6 +738,24 @@ void APERTURE_MACRO::DrawApertureMacroShape( GERBER_DRAW_ITEM* aParent,
}
}
/* Function HasNegativeItems
* return true if this macro has at least one aperture primitives
* that must be drawn in background color
* used to optimize screen refresh
*/
bool APERTURE_MACRO::HasNegativeItems( GERBER_DRAW_ITEM* aParent )
{
for( AM_PRIMITIVES::iterator prim_macro = primitives.begin();
prim_macro != primitives.end(); ++prim_macro )
{
if( prim_macro->mapExposure( aParent ) == false ) // = is negative
return true;
}
return false;
}
/** GetShapeDim
* Calculate a value that can be used to evaluate the size of text
* when displaying the D-Code of an item
......
......@@ -208,7 +208,8 @@ struct APERTURE_MACRO
void DrawApertureMacroShape( GERBER_DRAW_ITEM* aParent, EDA_Rect* aClipBox, wxDC* aDC,
int aColor, int aAltColor, wxPoint aShapePos, bool aFilledShape );
/** GetShapeDim
/**
* Function GetShapeDim
* Calculate a value that can be used to evaluate the size of text
* when displaying the D-Code of an item
* due to the complexity of a shape using many primitives
......@@ -220,6 +221,16 @@ struct APERTURE_MACRO
* @return a dimension, or -1 if no dim to calculate
*/
int GetShapeDim( GERBER_DRAW_ITEM* aParent );
/**
* Function HasNegativeItems
* @param aParent = the parent GERBER_DRAW_ITEM which is actually drawn
* @return true if this macro has at least one shape (using aperture primitives)
* must be drawn in background color
* used to optimize screen refresh (when no items are in background color
* refresh can be faster)
*/
bool HasNegativeItems( GERBER_DRAW_ITEM* aParent );
};
......
......@@ -310,6 +310,34 @@ bool GERBER_DRAW_ITEM::Save( FILE* aFile ) const
return true;
}
/* Function HasNegativeItems
* return true if this item or at least one shape (when using aperture macros)
* must be drawn in background color
* useful to optimize screen refresh
*/
bool GERBER_DRAW_ITEM::HasNegativeItems()
{
bool isClear = m_LayerNegative ^ m_imageParams->m_ImageNegative;
// if isClear is true, this item has negative shape
// but if isClear is true, and if this item use an aperture macro definition,
// we must see if this aperture macro uses a negative shape.
if( isClear )
return true;
// see for a macro def
D_CODE* dcodeDescr = GetDcodeDescr();
if( dcodeDescr == NULL )
return false;
if( m_Shape == GBR_SPOT_MACRO )
{
APERTURE_MACRO* macro = dcodeDescr->GetMacro();
if( macro ) // macro == NULL should not occurs
return macro->HasNegativeItems( this );
}
return false;
}
/*********************************************************************/
void GERBER_DRAW_ITEM::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, int aDrawMode,
......
......@@ -120,6 +120,15 @@ public:
return m_LayerNegative;
}
/**
* Function HasNegativeItems
* @return true if this item or at least one shape (when using aperture macros
* must be drawn in background color
* used to optimize screen refresh (when no items are in background color
* refresh can be faster)
*/
bool HasNegativeItems();
/**
* Function SetLayerParameters
* Initialize parameters from Image and Layer parameters
......
......@@ -18,8 +18,14 @@
#include "class_gerber_draw_item.h"
#include "class_GERBER.h"
static void Show_Items_DCode_Value( WinEDA_DrawPanel* panel, wxDC* DC,
BOARD* Pcb, int drawmode );
#ifdef __WINDOWS__
// Blit function seems have problems when scale != 1 and/or offsets
#define AVOID_BLIT_SCALE_BUG true
#else
#define AVOID_BLIT_SCALE_BUG false // not needed on Linux
#endif
/**
* Function PrintPage (virtual)
......@@ -73,15 +79,37 @@ void WinEDA_GerberFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg )
if( !GetBoard() )
return;
ActiveScreen = screen;
GRSetDrawMode( DC, GR_COPY );
DrawPanel->DrawBackGround( DC );
GetBoard()->Draw( DrawPanel, DC, GR_COPY, wxPoint( 0, 0 ) );
int drawMode = -1;
switch ( GetDisplayMode() )
{
default:
case 0:
break;
case 1:
drawMode = GR_COPY;
break;
case 2:
drawMode = GR_OR;
break;
}
GetBoard()->Draw( DrawPanel, DC,
drawMode, // this needs to be GR_COPY or GR_OR, set from a toggle button.
wxPoint( 0, 0 ) );
// Draw the "background" now, i.e. grid and axis after gerber layers
// because most of time the actual background is erased by succesive drawings of each gerber layer
// mainly in COPY mode
DrawPanel->DrawBackGround( DC );
if( IsElementVisible( DCODES_VISIBLE ) )
Show_Items_DCode_Value( DrawPanel, DC, GetBoard(), GR_COPY );
DrawItemsDCodeID( DC, GR_COPY );
TraceWorkSheet( DC, screen, 0 );
......@@ -99,34 +127,61 @@ void WinEDA_GerberFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg )
/********************************************************************/
void BOARD::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, int aDrawMode, const wxPoint& aOffset )
/********************************************************************/
/* Redraw the BOARD items but not cursors, axis or grid */
{
// Because Images can be negative (i.e with background filled in color) items are drawn
// graphic layer per graphic layer, after the background is filled
wxColour bgColor = MakeColour( g_DrawBgColor );
wxBrush bgBrush( bgColor, wxSOLID );
int bitmapWidth, bitmapHeight;
wxDC* plotDC = aDC;
#if AVOID_BLIT_SCALE_BUG
// Blit function used below seems to work OK only with scale = 1 and no offsets
// at least under Windows
// Store device context scale and origins:
double dc_scalex, dc_scaley;
wxPoint dev_org;
wxPoint logical_org;
aDC->GetDeviceOrigin( &dev_org.x, &dev_org.y );
aDC->GetLogicalOrigin( &logical_org.x, &logical_org.y );
aDC->GetUserScale( &dc_scalex, &dc_scaley);
aDC->GetUserScale( &dc_scalex, &dc_scaley );
// Blit function used below seems work OK only with scale = 1 and no offsets
if( aDrawMode != -1 )
{
aDC->SetUserScale( 1.0, 1.0 );
aDC->SetDeviceOrigin( 0,0 );
aDC->SetLogicalOrigin( 0,0 );
aDC->SetDeviceOrigin( 0, 0 );
aDC->SetLogicalOrigin( 0, 0 );
}
#endif
aPanel->GetClientSize( &bitmapWidth, &bitmapHeight );
wxBitmap layerBitmap( bitmapWidth, bitmapHeight );
wxBitmap* layerBitmap = NULL;
wxBitmap* screenBitmap = NULL;
wxMemoryDC memoryDC;
memoryDC.SelectObject( layerBitmap );
wxMemoryDC layerDC; // used sequentially for each gerber layer
wxMemoryDC screenDC;
wxColour bgColor = MakeColour( g_DrawBgColor );
wxBrush bgBrush( bgColor, wxSOLID );
if( aDrawMode != -1 )
{
layerBitmap = new wxBitmap( bitmapWidth, bitmapHeight );
screenBitmap = new wxBitmap( bitmapWidth, bitmapHeight );
layerDC.SelectObject( *layerBitmap );
layerDC.SetBackground( bgBrush );
layerDC.Clear();
screenDC.SelectObject( *screenBitmap );
screenDC.SetBackground( bgBrush );
screenDC.Clear();
aPanel->DoPrepareDC(layerDC);
aPanel->DrawBackGround( &layerDC );
plotDC = &layerDC;
}
bool doBlit = false; // this flag requests an image transfert to actual screen when true.
for( int layer = 0; layer < 32; layer++ )
{
if( !GetBoard()->IsLayerVisible( layer ) )
......@@ -136,96 +191,149 @@ void BOARD::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, int aDrawMode, const wxPo
if( gerber == NULL ) // Graphic layer not yet used
continue;
memoryDC.SetUserScale( dc_scalex, dc_scaley );
memoryDC.SetDeviceOrigin( dev_org.x, dev_org.y );
memoryDC.SetLogicalOrigin( logical_org.x, logical_org.y );
if( aDrawMode != -1 )
{
// Draw each layer into a bitmap first. Negative Gerber
// layers are drawn in background color.
memoryDC.SetBackground( bgBrush );
memoryDC.Clear();
if( gerber->HasNegativeItems() )
{
if( doBlit )
{
#if AVOID_BLIT_SCALE_BUG
layerDC.SetUserScale( 1.0, 1.0 );
layerDC.SetDeviceOrigin( 0, 0 );
layerDC.SetLogicalOrigin( 0, 0 );
#endif
if( aDrawMode == GR_COPY )
{
// Use the layer bitmap itself as a mask when blitting.
// The bitmap cannot be referenced by a device context
// when setting the mask.
layerDC.SelectObject( wxNullBitmap );
layerBitmap->SetMask( new wxMask( *layerBitmap, bgColor ) );
layerDC.SelectObject( *layerBitmap );
screenDC.Blit( 0, 0, bitmapWidth, bitmapHeight, &layerDC, 0, 0, wxCOPY, true );
}
else if( aDrawMode == GR_OR )
{
// On Linux with a large screen, this version is much faster and without flicker,
// but gives a PCBNEW look where layer colors blend together. Plus it works
// only because the background color is black. But it may be more useable for some.
// The difference is due in part because of the cpu cycles needed to create the
// monochromatic bitmap above, and the extra time needed to do bit indexing
// into the monochromatic bitmap on the blit above.
screenDC.Blit( 0, 0, bitmapWidth, bitmapHeight, &layerDC, 0, 0, wxOR );
}
}
doBlit = false;
layerDC.Clear();
}
}
#if AVOID_BLIT_SCALE_BUG
layerDC.SetUserScale( dc_scalex, dc_scaley );
layerDC.SetDeviceOrigin( dev_org.x, dev_org.y );
layerDC.SetLogicalOrigin( logical_org.x, logical_org.y );
#endif
if( gerber->m_ImageNegative )
{
// Draw background negative (i.e. in graphic layer color) for negative images.
int color = GetBoard()->GetLayerColor( layer );
GRSetDrawMode( (wxDC*)&memoryDC, GR_COPY ); // GR_COPY is faster than GR_OR
GRSetDrawMode( &layerDC, GR_COPY );
EDA_Rect* cbox = &aPanel->m_ClipBox;
GRSFilledRect( cbox, (wxDC*)&memoryDC, cbox->GetX(), cbox->GetY(),
GRSFilledRect( cbox, plotDC, cbox->GetX(), cbox->GetY(),
cbox->GetRight(), cbox->GetBottom(),
0, color, color );
GRSetDrawMode( (wxDC*)&memoryDC, aDrawMode );
GRSetDrawMode( plotDC, GR_COPY );
doBlit = true;
}
int dcode_highlight = 0;
if( layer == m_PcbFrame->GetScreen()->m_Active_Layer )
dcode_highlight = gerber->m_Selected_Tool;
int layerdrawMode = GR_COPY;
if( aDrawMode == GR_OR && !gerber->HasNegativeItems() )
layerdrawMode = GR_OR;
for( BOARD_ITEM* item = GetBoard()->m_Drawings; item; item = item->Next() )
{
GERBER_DRAW_ITEM* gerb_item = (GERBER_DRAW_ITEM*) item;
if( gerb_item->GetLayer() != layer )
continue;
int drawMode = aDrawMode;
if( dcode_highlight == gerb_item->m_DCode )
int drawMode = layerdrawMode;
if( dcode_highlight && dcode_highlight == gerb_item->m_DCode )
drawMode |= GR_SURBRILL;
gerb_item->Draw( aPanel, (wxDC*)&memoryDC, drawMode );
gerb_item->Draw( aPanel, plotDC, drawMode );
doBlit = true;
}
#if 0
// Use the layer bitmap itself as a mask when blitting.
// The bitmap cannot be referenced by a device context
// when setting the mask.
memoryDC.SelectObject( wxNullBitmap );
layerBitmap.SetMask( new wxMask( layerBitmap, bgColor ) );
memoryDC.SelectObject( layerBitmap );
aDC->Blit( 0, 0, bitmapWidth, bitmapHeight,
(wxDC*)&memoryDC, 0, 0, wxCOPY, true );
}
#else // Dick: seems a little faster, crisper
if( doBlit && aDrawMode != -1 ) // Blit is used only if aDrawMode >= 0
{
// this is the last transfert to screenDC
// If there are no negative items, this is the only one
#if AVOID_BLIT_SCALE_BUG
if( aDrawMode != -1 )
{
layerDC.SetUserScale( 1.0, 1.0 );
layerDC.SetDeviceOrigin( 0, 0 );
layerDC.SetLogicalOrigin( 0, 0 );
}
#endif
if( aDrawMode == GR_COPY )
{
layerDC.SelectObject( wxNullBitmap );
layerBitmap->SetMask( new wxMask( *layerBitmap, bgColor ) );
// Blit function seems work OK only with scale = 1 and no offsets
memoryDC.SetUserScale( 1.0, 1.0 );
memoryDC.SetDeviceOrigin( 0,0 );
memoryDC.SetLogicalOrigin( 0,0 );
aDC->Blit( 0, 0, bitmapWidth, bitmapHeight,
&memoryDC, 0, 0, wxOR, false );
layerDC.SelectObject( *layerBitmap );
#endif
screenDC.Blit( 0, 0, bitmapWidth, bitmapHeight, &layerDC, 0, 0, wxCOPY, true );
}
else if( aDrawMode == GR_OR )
screenDC.Blit( 0, 0, bitmapWidth, bitmapHeight, &layerDC, 0, 0, wxOR, false );
}
if( aDrawMode != -1 )
{
aDC->Blit( 0, 0, bitmapWidth, bitmapHeight, &screenDC, 0, 0, wxCOPY );
#if AVOID_BLIT_SCALE_BUG
// Restore scale and offsets values:
aDC->SetUserScale( dc_scalex, dc_scaley );
aDC->SetDeviceOrigin( dev_org.x, dev_org.y );
aDC->SetLogicalOrigin( logical_org.x, logical_org.y );
#endif
delete layerBitmap;
delete screenBitmap;
}
m_PcbFrame->GetScreen()->ClrRefreshReq();
}
/*****************************************************************************************/
void Show_Items_DCode_Value( WinEDA_DrawPanel* aPanel, wxDC* aDC, BOARD* aPcb, int aDrawMode )
/*****************************************************************************************/
/* Function DrawItemsDCodeID
* Draw the DCode value (if exists) corresponding to gerber item
* Polygons do not have a DCode
*/
void WinEDA_GerberFrame::DrawItemsDCodeID( wxDC* aDC, int aDrawMode )
{
wxPoint pos;
int width, orient;
wxString Line;
GRSetDrawMode( aDC, aDrawMode );
BOARD_ITEM* item = aPcb->m_Drawings;
BOARD_ITEM* item = GetBoard()->m_Drawings;
for( ; item != NULL; item = item->Next() )
{
GERBER_DRAW_ITEM* gerb_item = (GERBER_DRAW_ITEM*) item;
if( aPcb->IsLayerVisible( gerb_item->GetLayer() ) == false )
if( GetBoard()->IsLayerVisible( gerb_item->GetLayer() ) == false )
continue;
if( gerb_item->m_DCode <= 0 )
continue;
......@@ -250,7 +358,7 @@ void Show_Items_DCode_Value( WinEDA_DrawPanel* aPanel, wxDC* aDC, BOARD* aPcb, i
orient = TEXT_ORIENT_HORIZ;
if( gerb_item->m_Flashed )
{
// A reasonnable size for text is width/3 because most ot time this text has 3 chars.
// A reasonnable size for text is width/3 because most of time this text has 3 chars.
width /= 3;
}
else // this item is a line
......@@ -265,7 +373,7 @@ void Show_Items_DCode_Value( WinEDA_DrawPanel* aPanel, wxDC* aDC, BOARD* aPcb, i
int color = g_ColorsSettings.GetItemColor( DCODES_VISIBLE );
DrawGraphicText( aPanel, aDC,
DrawGraphicText( DrawPanel, aDC,
pos, (EDA_Colors) color, Line,
orient, wxSize( width, width ),
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
......
......@@ -28,7 +28,7 @@ void WinEDA_GerberFrame::OnFileHistory( wxCommandEvent& event )
if( fn != wxEmptyString )
{
Erase_Current_Layer( false );
LoadOneGerberFile( fn, false );
LoadGerberFiles( fn );
}
}
......@@ -42,9 +42,8 @@ void WinEDA_GerberFrame::Files_io( wxCommandEvent& event )
{
case wxID_FILE:
{
wxString fileName = GetScreen()->m_FileName;
Erase_Current_Layer( false );
LoadOneGerberFile( fileName, true );
LoadGerberFiles( wxEmptyString );
break;
}
......@@ -56,7 +55,7 @@ void WinEDA_GerberFrame::Files_io( wxCommandEvent& event )
{
setActiveLayer(origLayer+1);
Erase_Current_Layer( false );
if( !LoadOneGerberFile( wxEmptyString ) )
if( !LoadGerberFiles( wxEmptyString ) )
setActiveLayer(origLayer);
SetToolbars();
}
......@@ -92,14 +91,16 @@ delete an existing layer to load any new layers." ), NB_LAYERS );
}
bool WinEDA_GerberFrame::LoadOneGerberFile( const wxString& aFullFileName, bool aOpenFileDialog )
bool WinEDA_GerberFrame::LoadGerberFiles( const wxString& aFullFileName )
{
wxString filetypes;
wxArrayString filenamesList;
wxFileName filename = aFullFileName;
wxString currentPath;
ActiveScreen = GetScreen();
if( !filename.IsOk() || aOpenFileDialog )
if( ! filename.IsOk() )
{
/* Standard gerber filetypes
* (See http://en.wikipedia.org/wiki/Gerber_File)
......@@ -132,30 +133,57 @@ bool WinEDA_GerberFrame::LoadOneGerberFile( const wxString& aFullFileName, bool
filetypes += AllFilesWildcard;
/* Use the current working directory if the file name path does not exist. */
wxString current_path = wxGetCwd();
if( filename.DirExists() )
current_path = filename.GetPath();
currentPath = filename.GetPath();
else
currentPath = wxGetCwd();
wxFileDialog dlg( this,
_( "Open Gerber File" ),
current_path,
currentPath,
filename.GetFullName(),
filetypes,
wxFD_OPEN | wxFD_FILE_MUST_EXIST );
wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_MULTIPLE | wxFD_CHANGE_DIR );
if( dlg.ShowModal() == wxID_CANCEL )
return false;
filename = dlg.GetPath();
dlg.GetFilenames( filenamesList );
currentPath = wxGetCwd();
}
else
{
wxFileName filename = aFullFileName;
filenamesList.Add( aFullFileName );
currentPath = filename.GetPath();
}
// Read gerber files: each file is loaded on a new gerbview layer
int layer = getActiveLayer() - 1;
for( unsigned ii = 0; ii < filenamesList.GetCount(); ii++ )
{
wxFileName filename = filenamesList[ii];
filename.SetPath( currentPath );
GetScreen()->m_FileName = filename.GetFullPath();
wxSetWorkingDirectory( filename.GetPath() );
filename.SetExt( g_PenFilenameExt );
layer++;
if( layer >= NB_LAYERS )
layer = 0;
setActiveLayer(layer);
if( Read_GERBER_File( GetScreen()->m_FileName, filename.GetFullPath() ) )
{
SetLastProject( GetScreen()->m_FileName );
}
else
{
layer--;
if( layer >= 0 )
setActiveLayer(layer);
else
setActiveLayer(0);
}
}
Zoom_Automatique( false );
GetScreen()->SetRefreshReq();
......@@ -203,36 +231,3 @@ static void LoadDCodeFile( WinEDA_GerberFrame* frame,
frame->CopyDCodesSizeToItems();
frame->GetScreen()->SetRefreshReq();
}
/* Save the file in ASCII PCB.
*/
bool WinEDA_GerberFrame::SaveGerberFile( const wxString& FullFileName )
{
wxString wildcard;
wxFileName fn = FullFileName;
if( !fn.IsOk() )
{
fn = GetScreen()->m_FileName;
wildcard.Printf( _( "Gerber DCODE files (%s)|*.%s" ),
GetChars( g_PenFilenameExt ),
GetChars( g_PenFilenameExt ) );
wxFileDialog dlg( this, _( "Save Gerber File" ), fn.GetPath(),
fn.GetFullName(), wildcard,
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
if( dlg.ShowModal() == wxID_CANCEL )
return false;
fn = dlg.GetPath();
}
GetScreen()->m_FileName = fn.GetFullPath();
// TODO
return true;
}
......@@ -119,6 +119,12 @@ BEGIN_EVENT_TABLE( WinEDA_GerberFrame, WinEDA_BasePcbFrame )
WinEDA_GerberFrame::OnSelectOptionToolbar )
EVT_TOOL( ID_TB_OPTIONS_SHOW_DCODES,
WinEDA_GerberFrame::OnSelectOptionToolbar )
EVT_TOOL( ID_TB_OPTIONS_SHOW_GBR_MODE_0,
WinEDA_GerberFrame::OnSelectDisplayMode )
EVT_TOOL( ID_TB_OPTIONS_SHOW_GBR_MODE_1,
WinEDA_GerberFrame::OnSelectDisplayMode )
EVT_TOOL( ID_TB_OPTIONS_SHOW_GBR_MODE_2,
WinEDA_GerberFrame::OnSelectDisplayMode )
END_EVENT_TABLE()
......@@ -137,6 +143,7 @@ WinEDA_GerberFrame::WinEDA_GerberFrame( wxWindow* father,
m_HotkeysZoomAndGridList = s_Gerbview_Hokeys_Descr;
m_SelLayerBox = NULL;
m_SelLayerTool = NULL;
m_displayMode = 0;
if( DrawPanel )
DrawPanel->m_Block_Enable = true;
......@@ -279,6 +286,7 @@ void WinEDA_GerberFrame::LoadSettings()
return;
WinEDA_BasePcbFrame::LoadSettings();
config->Read( GerbviewDrawModeOption, &m_displayMode, 0l );
long pageSize_opt;
config->Read( GerbviewShowPageSizeOption, &pageSize_opt, 0l );
int imax = 0;
......@@ -325,6 +333,8 @@ void WinEDA_GerberFrame::SaveSettings()
}
}
}
config->Write( GerbviewDrawModeOption, m_displayMode );
config->Write( GerbviewShowPageSizeOption, pageSize_opt );
config->Write( GerbviewShowDCodes, IsElementVisible( DCODES_VISIBLE ) );
}
......@@ -528,7 +538,8 @@ void WinEDA_GerberFrame::UpdateTitleAndInfo()
text = wxGetApp().GetAppName() + wxT( " " ) + GetBuildVersion();
SetTitle( text );
SetStatusText( wxEmptyString, 0 );
m_TextInfo->Clear();
text.Printf( _("Layer %d not used"), GetScreen()->m_Active_Layer+1 );
m_TextInfo->SetValue( text );
ClearMsgPanel();
return;
}
......@@ -556,3 +567,30 @@ void WinEDA_GerberFrame::UpdateTitleAndInfo()
}
/* Function OnSelectDisplayMode: called to select display mode
* (fast display, or exact mode with stacked images or with transparency
*/
void WinEDA_GerberFrame::OnSelectDisplayMode( wxCommandEvent& event )
{
int oldMode = GetDisplayMode();
switch( event.GetId() )
{
case ID_TB_OPTIONS_SHOW_GBR_MODE_0:
SetDisplayMode( 0 );
break;
case ID_TB_OPTIONS_SHOW_GBR_MODE_1:
SetDisplayMode( 1 );
break;
case ID_TB_OPTIONS_SHOW_GBR_MODE_2:
SetDisplayMode( 2 );
break;
}
SetToolbars();
if( GetDisplayMode() != oldMode )
DrawPanel->Refresh();
}
......@@ -39,8 +39,9 @@ const wxString GerbviewProjectFileExt( wxT( "cnf" ) );
const wxString GerbviewProjectFileWildcard( _( "GerbView project files (.cnf)|*.cnf" ) );
// Config keywords
const wxString GerbviewDrawModeOption( wxT( "DrawModeOption" ) );
const wxString GerbviewShowPageSizeOption( wxT( "ShowPageSizeOpt" ) );
extern const wxString GerbviewShowDCodes( wxT( "ShowDCodesOpt" ) );
const wxString GerbviewShowDCodes( wxT( "ShowDCodesOpt" ) );
GERBER_IMAGE* g_GERBER_List[32];
......@@ -68,7 +69,7 @@ void WinEDA_App::MacOpenFile(const wxString &fileName)
if( !filename.FileExists() )
return;
frame->LoadOneGerberFile( fileName );
frame->LoadGerberFiles( fileName );
}
......@@ -140,7 +141,7 @@ bool WinEDA_App::OnInit()
if( fn.FileExists() )
{
( (PCB_SCREEN*) frame->GetScreen() )->m_Active_Layer = ii - 1;
frame->LoadOneGerberFile( fn.GetFullPath() );
frame->LoadGerberFiles( fn.GetFullPath() );
}
}
}
......
......@@ -62,6 +62,7 @@ extern const wxString GerbviewProjectFileWildcard;
extern Ki_PageDescr* g_GerberPageSizeList[];
// Config keywords
extern const wxString GerbviewDrawModeOption;
extern const wxString GerbviewShowPageSizeOption;
extern const wxString GerbviewShowDCodes;
......
......@@ -25,6 +25,9 @@ enum gerbview_ids
ID_TB_OPTIONS_SHOW_DCODES,
ID_TB_OPTIONS_SHOW_FLASHED_ITEMS_SKETCH,
ID_TB_OPTIONS_SHOW_LINES_SKETCH,
ID_TB_OPTIONS_SHOW_GBR_MODE_0,
ID_TB_OPTIONS_SHOW_GBR_MODE_1,
ID_TB_OPTIONS_SHOW_GBR_MODE_2,
ID_GERBER_END_LIST
};
......
......@@ -55,8 +55,6 @@ void WinEDA_GerberFrame::ReCreateMenuBar( void )
filesMenu->AppendSeparator();
filesMenu->Append( wxID_PRINT, _( "P&rint" ), _( "Print gerber" ) );
filesMenu->Append( ID_GEN_PLOT, _( "Plot" ),
_( "Plotting in various formats" ) );
filesMenu->AppendSeparator();
filesMenu->Append( ID_EXIT, _( "E&xit" ), _( "Quit Gerbview" ) );
......
......@@ -61,14 +61,10 @@ bool WinEDA_GerberFrame::OnRightClick( const wxPoint& MousePos,
if( BlockActive )
return true;
PopMenu->Append( ID_GERBVIEW_POPUP_DELETE_DCODE_ITEMS,
_( "Delete Dcode items" ) );
if( DrawStruct == NULL )
return true;
GetScreen()->SetCurItem( DrawStruct );
PopMenu->AppendSeparator();
return true;
}
......@@ -503,6 +503,7 @@ bool GERBER_IMAGE::ExecuteRS274XCommand( int command,
case LAYER_POLARITY:
if( *text == 'C' )
GetLayerParams().m_LayerNegative = true;
else
GetLayerParams().m_LayerNegative = false;
D( printf( "%22s: LAYER_POLARITY m_LayerNegative=%s\n", __func__,
......
......@@ -200,6 +200,24 @@ void WinEDA_GerberFrame::ReCreateOptToolbar( void )
wxBitmap( show_dcodenumber_xpm ),
_( "Show dcode number" ), wxITEM_CHECK );
// tools to select draw mode in gerbview
m_OptionsToolBar->AddSeparator();
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_GBR_MODE_0, wxEmptyString,
wxBitmap( gbr_select_mode0_xpm ),
_( "Show layers in raw mode\
(could have problems with negative items when more than one gerber file is shown)" ),
wxITEM_CHECK );
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_GBR_MODE_1, wxEmptyString,
wxBitmap( gbr_select_mode1_xpm ),
_( "Show layers in stacked mode\
(show negative items without artefact, sometimes slow)" ),
wxITEM_CHECK );
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_GBR_MODE_2, wxEmptyString,
wxBitmap( gbr_select_mode2_xpm ),
_( "Show layers in tranparency mode\
(show negative items without artefact, sometimes slow)" ),
wxITEM_CHECK );
// Tools to show/hide toolbars:
m_OptionsToolBar->AddSeparator();
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_LAYERS_MANAGER_VERTICAL_TOOLBAR,
......@@ -258,8 +276,7 @@ void WinEDA_GerberFrame::SetToolbars()
{
m_OptionsToolBar->ToggleTool(
ID_TB_OPTIONS_SELECT_UNIT_MM,
g_UserUnit ==
MILLIMETRES ? true : false );
g_UserUnit == MILLIMETRES ? true : false );
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SELECT_UNIT_INCH,
g_UserUnit == INCHES ? true : false );
......@@ -284,6 +301,10 @@ void WinEDA_GerberFrame::SetToolbars()
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_DCODES,
IsElementVisible( DCODES_VISIBLE ) );
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_GBR_MODE_0, GetDisplayMode() == 0 );
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_GBR_MODE_1, GetDisplayMode() == 1 );
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_GBR_MODE_2, GetDisplayMode() == 2 );
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_LAYERS_MANAGER_VERTICAL_TOOLBAR,
m_show_layer_manager_tools );
if( m_show_layer_manager_tools )
......
......@@ -50,6 +50,15 @@ public:
// gerber data (format..)
private:
int m_displayMode; // Gerber images ("layers" in Gerbview) can be drawn:
// - in fast mode (write mode) but if there are negative items
// only the last image is correctly drawn
// (no problem to see only one image or when no negative items)
// - in "exact" mode (but slower) in write mode:
// last image covers previous images
// - in "exact" mode (also slower) in OR mode
// (transparency mode)
// m_displayMode = 0, 1 or 2
bool m_show_layer_manager_tools;
wxArrayString m_Messages; // An array sting to store warning messages when reaging a gerber file
......@@ -83,6 +92,22 @@ public:
m_Messages.Clear( );
}
/**
* Function GetDisplayMode
* @return 0 for fast mode (not fully compatible with negative objects)
* 1 for exact mode, write mode
* 2 for exact mode, OR mode (transparency mode)
*/
int GetDisplayMode() { return m_displayMode;}
/**
* Function SetDisplayMode
* @param aMode = 0 for fast mode
* 1 for exact mode, write mode
* 2 for exact mode, OR mode (transparency mode)
*/
void SetDisplayMode( int aMode ) { m_displayMode = aMode;}
/**
* Function IsGridVisible() , virtual
* @return true if the grid must be shown
......@@ -234,6 +259,13 @@ public:
bool OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu );
int BestZoom();
void OnSelectOptionToolbar( wxCommandEvent& event );
/**
* Function OnSelectDisplayMode
* called on a display mode selection
* Mode selection can be fast display,
* or exact mode with stacked images or with transparency
*/
void OnSelectDisplayMode( wxCommandEvent& event );
void OnHotKey( wxDC* DC, int hotkey, EDA_ITEM* DrawStruct );
GERBER_DRAW_ITEM* GerberGeneralLocateAndDisplay();
......@@ -284,7 +316,6 @@ public:
*/
void Block_Duplicate( wxDC* DC );
void InstallDrillFrame( wxCommandEvent& event );
void ToPostProcess( wxCommandEvent& event );
/**
......@@ -318,20 +349,17 @@ public:
void OnFileHistory( wxCommandEvent& event );
/**
* Load a photoplot (Gerber) file.
*
* @param aFileName - File name with full path to open or empty string to open a new
* file.
* @param aOpenFileDialog - Set to true to display the open file dialog even if
* aFileName is valid.
*
* @return - True if file was opened successfully.
* function LoadGerberFiles
* Load a photoplot (Gerber) file or many files.
* @param aFileName - void string or file name with full path to open or empty string to open a new
* file. In this case one one file is loaded
* if void string: user will be prompted for filename(s)
* @return true if file was opened successfully.
*/
bool LoadOneGerberFile( const wxString& aFileName, bool aOpenFileDialog = false );
bool LoadGerberFiles( const wxString& aFileName );
int ReadGerberFile( FILE* File, bool Append );
bool Read_GERBER_File( const wxString& GERBER_FullFileName,
const wxString& D_Code_FullFileName );
bool SaveGerberFile( const wxString& FileName );
void GeneralControle( wxDC* DC, wxPoint Mouse );
......@@ -409,13 +437,22 @@ public:
int aPrintMasklayer, bool aPrintMirrorMode,
void * aData = NULL);
/** InstallDialogLayerPairChoice
/**
* Function InstallDialogLayerPairChoice
* Install a dialog frame to choose the equivalence
* between gerber layers and pcbnew layers
* @return the "lookup table" if ok, or NULL
*/
int* InstallDialogLayerPairChoice( );
/**
* Function DrawItemsDCodeID
* Draw the DCode value (if exists) corresponding to gerber item
* (polygons do not have a DCode)
* @param aDC = the current device contect
* @param aDrawMode = GR_COPY, GR_OR ...
*/
void DrawItemsDCodeID( wxDC* aDC, int aDrawMode );
DECLARE_EVENT_TABLE()
};
......
......@@ -129,6 +129,9 @@ extern const char* find_xpm[];
extern const char* flag_xpm[];
extern const char* fonts_xpm[];
extern const char* footprint_text_xpm[];
extern const char* gbr_select_mode0_xpm[];
extern const char* gbr_select_mode1_xpm[];
extern const char* gbr_select_mode2_xpm[];
extern const char* general_deletions_xpm[];
extern const char* general_ratsnet_xpm[];
extern const char* glabel2label_xpm[];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment