Merge pull request #124 from johnthagen/patch-2

Syntax highlight example code in README
This commit is contained in:
Paulo Henrique Silva 2020-01-08 14:07:06 -03:00 committed by GitHub
commit 31c35c8a14
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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:
-------------------