Commit graph

63 commits

Author SHA1 Message Date
Hamilton Kibbe
e754f59468 Remove rest of mixed unpack/kwarg syntax to fix #72 2017-07-04 01:22:47 -04:00
Hamilton Kibbe
8def119980 Merge pull request #71 from tomacorp/layer_bounds_arg
Added bounds argument to render_layer()
2017-06-12 08:02:59 -04:00
Hamilton Kibbe
b85021d9b8 Merge pull request #68 from jmargeta/cairo_python_3_fix
Fix Cairo backend for svg saving and Python 3
2017-06-12 07:58:59 -04:00
Hamilton Kibbe
f7a719e6f7 Fix error when unpacking colors in cairo backend 2017-06-12 07:58:06 -04:00
Tom Anderson
e0b45108d2 Added bounds argument to render_layer() 2017-05-24 09:42:23 -07:00
Jan Margeta
7873999926 Fix Cairo backend for svg saving and Python 3 2017-04-15 15:29:58 +02:00
Hamilton Kibbe
19a8fb0048 Add max_width and max_height arguments to 2016-12-13 20:22:54 -05:00
Hamilton Kibbe
7c4ec8a768 Clip context to axis- and pixel- aligned bounds before rendering primitives. Significantly speeds up render 2016-12-13 00:01:05 -05:00
Hamilton Kibbe
5696fc7064 Fix a bunch of bugs in rendering that showed up when rendering the gerbv test suite 2016-11-18 08:09:03 -05:00
Hamilton Kibbe
60d08dc8ad Merge upstream change 2016-11-07 21:20:26 -05:00
Girts Folkmanis
369ac7b2a3 cairo_backend.py: use BytesIO instead of StringIO
This fixes a crash in cairocffi on Python3, and should be compatible
with both python2 and python3. In python2, byte strings are just
strings. In python3, when getting binary data, the user probably wants
a byte string instead of a regular string.
2016-11-07 17:11:07 -08:00
Hamilton Kibbe
6db0658e23 Fix tests on python3 2016-11-06 15:08:00 -05:00
Hamilton Kibbe
d7a0f3ad2b Remove debug print" 2016-11-06 14:58:32 -05:00
Hamilton Kibbe
422c86bcc6 Merge upstream changes 2016-11-06 14:44:40 -05:00
Hamilton Kibbe
724c2b3bce Finish Merge, most tests passing 2016-11-05 20:56:47 -04:00
Hamilton Kibbe
5af19af190 Commit partial merge so I can work on the plane 2016-09-24 02:28:36 +08:00
Garret Fick
8d5e782ccf Fix multiple problems with the merge. There are still errors, but I will intentionally leave them because future merges might resolve them 2016-08-06 09:51:58 +08:00
Hamilton Kibbe
8cd842a41a Manually mere rendering changes 2016-08-06 09:40:40 +08:00
Garret Fick
7cd6acf126 Add many render tests based on the Umaco gerger specification. Fix multiple rendering bugs, especially related to holes in flashed apertures 2016-07-24 17:08:47 +08:00
Garret Fick
b0e13cc596 Merge in 6a005436b4 2016-07-20 23:37:18 +08:00
Garret Fick
e8327fda79 Manually merge change 5430fa6738 2016-07-20 23:26:51 +08:00
Garret Fick
76a49ec8e7 Manually merge change 6f876edd09 2016-07-20 23:20:15 +08:00
Garret Fick
34f20ee90f Manually merge af5541ac93 2016-07-17 21:04:15 +08:00
Garret Fick
f0585baefa Create first test that renders and validates the the rendered PNG is correct. 2016-07-17 13:14:54 +08:00
Garret Fick
0dded38353 Merge in negative soldermask. Still required further changes to support negatives for shapes that dont exist in the merge source 2016-07-17 10:42:03 +08:00
Garret Fick
ccb6eb7a76 Add support for polygon apertures 2016-06-25 16:46:44 +08:00
Garret Fick
b01c4822b6 Render aperture macros with clear regions 2016-06-25 12:27:28 +08:00
Qau Lau
199a0f3d3c Update cairo_backend.py
If cairo  module import error use cairocffi
2016-04-08 20:02:04 +08:00
Garret Fick
acde19f205 Support for the G85 slot statement 2016-03-26 15:59:42 +08:00
Garret Fick
96bdd0f59d Keep track of quadrant mode so we can draw full circles 2016-01-31 15:24:57 +08:00
Hamilton Kibbe
5df38c014f Cleanup, rendering fixes.
fixed rendering of tented vias
fixed rendering of semi-transparent layers
fixed file type detection issues
added some examples
2016-01-28 12:19:03 -05:00
Hamilton Kibbe
66a0d09e72 Add support for mirrored rendering
- The default theme now renders the bottom layers mirrored.
  - see https://github.com/curtacircuitos/pcb-tools/blob/master/examples/pcb_bottom.png
    for an example.
2016-01-21 04:39:55 -05:00
Hamilton Kibbe
5476da8aa3 Fix a bunch of rendering bugs.
- 'clear' polarity primitives no longer erase background
  - Added aperture macro support for polygons
  - Added aperture macro rendring support
  - Renderer now creates a new surface for each layer and merges them instead of working
    directly on a single surface
  - Updated examples accordingly
2016-01-21 03:57:44 -05:00
Garret Fick
83ae0670d1 More stability fixes for poorly constructed files 2016-01-08 00:19:47 +08:00
Hamilton Kibbe
6a005436b4 Refactor a little
pulled all rendering stuff out of the pcb/layer objects
2016-01-01 12:25:38 -05:00
Garret Fick
f61eee807f Render polygon flashes 2015-12-30 18:44:07 +08:00
Garret Fick
4a815bf25d First time any macro renders 2015-12-30 14:05:00 +08:00
Hamilton Kibbe
5430fa6738 Python3 fix 2015-12-22 10:18:51 -05:00
Hamilton Kibbe
6f876edd09 Add PCB interface
this incorporates some of @chintal's layers.py changes
PCB.from_directory() simplifies loading of multiple gerbers
the PCB() class should be pretty helpful going forward...

the context classes could use some cleaning up, although I'd like to wait until the freecad stuff gets merged, that way we can try to refactor the context base to support more use cases
2015-12-22 02:47:23 -05:00
Hamilton Kibbe
af5541ac93 Allow renderer to write to memory per #38
Some updates to rendering colors/themes
2015-12-20 23:54:20 -05:00
Hamilton Kibbe
60c5906b29 Clean up negative render code 2015-12-20 15:24:20 -05:00
Hamilton Kibbe
1cb269131b Allow negative render of soldermask per #50
Update example code and rendering to show change
2015-12-19 21:54:29 -05:00
Garret Fick
206f4c57ab Fix drawing arcs. Dont crash for arcs with rectangular apertures. Fix crash with board size of zero for only one drill 2015-12-16 18:59:25 +08:00
Garret Fick
d69f50e0f6 Make the hit accessible from the drawable Hit, fix crash with cario drawing rect 2015-12-02 12:44:30 +08:00
Garret Fick
8eede187f3 More fixes to work with cairo 2015-11-23 22:22:30 +08:00
Garret Fick
d5f382f4b4 Render with cairo instead of cairocffi - I would like to make it use either, but for now, using the one that works with wxpython 2015-11-23 16:17:31 +08:00
Hamilton Kibbe
dd63b169f1 Allow files to be read from strings per #37
Adds a loads() method to the top level module which generates a GerberFile or ExcellonFile from a string
2015-10-10 16:51:21 -04:00
Hamilton Kibbe
cb2fa34e88 Add support for arcs in regions.
This fixes the circular cutout issue described in #32.  Regions were previously stored as a collection of points, now they are stored as a collection of line and arc primitives.
2015-08-09 15:11:13 -04:00
Hamilton Kibbe
d4a8705708 Fix windows permission error
per #33
the issue was trying to re-open the temporary file. it works on everything but windows. I've changed it to seek to the beginning and read from the file without re-opening, which should fix the issue.
2015-07-25 09:48:58 -04:00
Hamilton Kibbe
39726e3936 Fix multiple layer issue in cairo-unification branch (see #33) 2015-07-22 22:13:09 -04:00