diff options
author | johnthagen <johnthagen@users.noreply.github.com> | 2019-12-28 20:55:43 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-28 20:55:43 -0500 |
commit | 6ca4d3d1328556b7ff1d994001451dd473b40ccb (patch) | |
tree | 58c41eb571d0deac5dfe14a597dadff02332a723 /README.md | |
parent | efb46c562cf1cfdf0f340cff81cea8bc06e97dc4 (diff) | |
download | gerbonara-6ca4d3d1328556b7ff1d994001451dd473b40ccb.tar.gz gerbonara-6ca4d3d1328556b7ff1d994001451dd473b40ccb.tar.bz2 gerbonara-6ca4d3d1328556b7ff1d994001451dd473b40ccb.zip |
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: ------------------- |