Syntax highlight example code in README
This commit is contained in:
parent
efb46c562c
commit
6ca4d3d132
1 changed files with 12 additions and 10 deletions
22
README.md
22
README.md
|
|
@ -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:
|
||||
-------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue