diff options
author | Paulo Henrique Silva <ph.silva@gmail.com> | 2020-01-08 14:07:06 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-08 14:07:06 -0300 |
commit | 31c35c8a1491572938ce320fe3ddfb26603e96c2 (patch) | |
tree | 2e3886aa5e87774705880a121faf3bc999a7a085 /README.md | |
parent | c60373a67f18fad60710024d7ffe011bf5a536e6 (diff) | |
parent | 6ca4d3d1328556b7ff1d994001451dd473b40ccb (diff) | |
download | gerbonara-31c35c8a1491572938ce320fe3ddfb26603e96c2.tar.gz gerbonara-31c35c8a1491572938ce320fe3ddfb26603e96c2.tar.bz2 gerbonara-31c35c8a1491572938ce320fe3ddfb26603e96c2.zip |
Merge pull request #124 from johnthagen/patch-2
Syntax highlight example code in README
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 22 |
1 files changed, 12 insertions, 10 deletions
@@ -8,20 +8,22 @@ Tools to handle Gerber and Excellon files in Python. Usage Example: --------------- - import gerber - from gerber.render import GerberCairoContext - # Read gerber and Excellon files - top_copper = gerber.read('example.GTL') - nc_drill = gerber.read('example.txt') +```py +import gerber +from gerber.render import GerberCairoContext - # Rendering context - ctx = GerberCairoContext() +# Read gerber and Excellon files +top_copper = gerber.read('example.GTL') +nc_drill = gerber.read('example.txt') - # Create SVG image - top_copper.render(ctx) - nc_drill.render(ctx, 'composite.svg') +# Rendering context +ctx = GerberCairoContext() +# Create SVG image +top_copper.render(ctx) +nc_drill.render(ctx, 'composite.svg') +``` Rendering Examples: ------------------- |