Commit Graph

24 Commits

Author SHA1 Message Date
Florian Festi fd30b8b0b7 Only merge paths with the same color and width
Related: #353
2022-06-28 08:35:00 +02:00
Florian Festi bfa327d83a Don't try to add closed loops to other paths
This is too slow for hole patterns and the holes can't be added anywhere
anyway.
2022-06-07 08:51:25 +02:00
suks.ae ce032e323f reworked color handling to improve mapping with Lightburn layers 2022-06-05 12:18:51 +02:00
suks.ae ec0d24efd2 Fix svg text alignment for "middle"
See https://stackoverflow.com/questions/19212498/firefox-support-for-alignment-baseline-property/21373135#21373135
2022-05-27 15:05:37 +02:00
Florian Festi e6ef17c070 Quote -- everywhere in the SVG/XML comment
by adding spaces inbetween. Double replace to deal with multiple dashes
in as row. Otherwise a space would be added only every second gap due to
overlapping replacements.
2022-05-15 16:06:24 +02:00
suks.ae 7485e47e42 added group support to lbrn2 output 2022-04-19 21:57:58 +02:00
suks.ae e8e75765b9 fixed error generating an empty path list 2022-03-30 08:08:52 +02:00
suks.ae cf99c93400 lbrn2 output: Suppress output of empty text fields 2022-03-28 21:43:48 +02:00
suks.ae e8b88e53f1 add Lightburn .lbrn2 file format support 2022-03-27 22:02:44 +02:00
Florian Festi a7063011b5 Add inner_corner default setting
to allow removing the loops in inner corners

Related: #294
2022-03-20 19:04:27 +01:00
Florian Festi fce7e08a1a Adjust line width in transform()
Pass scale param down the transform call tree.
This fixes the inner corners for the PS output which were seen as "too
big" when comparing with the wrong line width.

Resolves: #332
2021-10-09 13:59:24 +02:00
Florian Festi b344229c95 Add metadata to PostScript output
as title, creator and further comments.
Unfortunately pstoedit does drop these when converting to other
formats. A pity.
2021-05-29 10:55:36 +02:00
Florian Festi 8613c64b32 Also scale line width
This in practise only affects PostScript and derived formats - basically
everything except SVG
2020-11-19 23:23:39 +01:00
Florian Festi 2d64dcccdf Fix Context.curve_to
Didn't move to the end point properly in the new backend.
2020-10-20 17:00:15 +02:00
Florian Festi 3513cf88a8 Fix code closing paths to look at each section separately 2020-09-15 17:44:58 +02:00
Florian Festi 6cd6e1826e Close paths in SVG back end 2020-05-23 15:03:16 +02:00
Florian Festi 46b1e8684f Add estimate for extents of text
Fix adjustment of SVG coordinates
2020-05-18 22:30:28 +02:00
Florian Festi 95dc7f5731 Fix padding for SVG 2020-05-18 22:30:28 +02:00
Florian Festi 3c94b4bf76 Don't try to draw arcs with an zero angle
Thanks to Bruno Ferrarese <https://github.com/bferrarese> for finding and
reporting this issue!
2020-05-18 22:30:28 +02:00
Florian Festi 6440bcb639 Get text working for both SVG and PS
Move coordiate translation to to finish() method
Use Latin1 encoding for text PS in output

Add Boxes.set_font() to support basic font styles:
 serif, sans-serif and monospaced
 in normal, bold, italic and both bold and italic
2020-05-18 22:30:28 +02:00
Florian Festi 492e7fb4dd SVGSurface: Use horizontal and vertial lines
instead for just regular lines. This saves one number per point involved.
2020-05-18 22:30:28 +02:00
Florian Festi fddf78fcc3 Add metadata to the SVG files right away 2020-05-18 22:30:28 +02:00
Florian Festi 0594ee703d Replace svgwrite with xml.ElementTree 2020-05-18 22:30:28 +02:00
Thomas Kalka fd48e57f33 Implement new backend without cairo
by providing SVGSurface, PSSurface and Context classes

Disable post processing as we want to create proper files right away
2020-05-18 22:30:28 +02:00