Commit Graph

30 Commits

Author SHA1 Message Date
Florian Festi 9e08691e15 Remove SVG and PS post processing code
Remove Extend class from svgutil
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
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
Florian Festi 0178a853c3 Add Inkscape style meta data to SVG output 2020-03-01 16:53:41 +01:00
Florian Festi 9a17e3efa9 Precompile optimizations REs and fix performance issue 2019-08-22 00:31:45 +02:00
Florian Festi 39bd912c90 Harden Extend.addPoint for None arguments 2019-08-18 14:46:13 +02:00
Florian Festi 0409bcbe65 Fix SVG merging for Inkscape
Resolves: #163
2019-08-16 22:37:42 +02:00
Florian Festi 65d2293e25 Fix Extend.__add__ for None values 2019-08-15 23:12:35 +02:00
Florian Festi 73422b0faf Fix name space handling in new svg code 2019-07-31 23:40:48 +02:00
Rotzbua c06b95d2d0 link: http -> https 2019-07-20 00:23:29 +02:00
Florian Festi 0a55e9ca6b Optimize SVG paths
Resolves #63
2019-07-19 21:49:55 +02:00
Florian Festi fff74cf382 Add metadata as a xml comment
Resolves #66
2019-07-07 13:43:04 +02:00
Florian Festi 31d46088c2 Move drawing to origin for SVGs 2019-07-04 17:52:28 +02:00
Florian Festi 635a42a25e Use eTree to caclulate the eytend of the drawing
Also check symbols (text character) now
2019-07-04 17:52:28 +02:00
Florian Festi d162c769b4 Use built in eTree implementation instead of lxml 2019-07-04 17:52:08 +02:00
Florian Festi 4a9cdc8d8e Switch to eTree as a xml library (instead of minidom) 2019-07-04 17:48:53 +02:00
Stefan Grosshauser 443c8a1c38 properly rewrite svg viewPort using minidom for xml
This avoids raising the 'Not enough space for size' exception.
2019-07-04 17:48:53 +02:00
Florian Festi 25ea02d317 Handle the drawing reaching into the negative x axis properly 2019-02-14 21:15:28 +01:00
Florian Festi ddcf13bf6c svgutil: Make detection of view port a bit more robust 2017-08-20 19:56:33 +02:00
Florian Festi 121e2107fb Import lxml locally to avoid hard dependency
The code is used in the Inkscape plugin only.
2017-03-10 23:00:41 +01:00
Florian Festi a81ba48d45 Take viewBox and size of SVG documents into account when merging them 2017-02-25 16:10:28 +01:00
Florian Festi ff7ee22885 Add svgutil.svgMerge() allwing to add generated box into anoterh svg
Implemetation has still many short comings. E.g. assumes units and layout of
document passed in. Also assumes to be merged document to be generated by
boxes.py.
2017-02-23 17:38:26 +01:00
schinken 93af56ff9c Code Reformat #1 2016-08-17 15:07:41 +02:00
Florian Festi 2117bfbc15 Do not error out if drawing does into the negative x direction
... unless there is not enough place for the viewport.
2016-07-25 18:56:00 +02:00
Marius Bergmann 4b487014d0 Fix project for use within virtualenv
- Use /usr/bin/env to determine path to python3 instead of a hard-coded
  path, so that virtualenv stubs work properly.
- Change package name to 'boxes' ('boxes.py' did not work within
  virtualenv).
2016-07-12 13:13:03 +02:00
Florian Festi a1c6652552 Use a more robust way to replace the size and viewport in the svg
Increase maximum size of canvas to 10000mm squared.
2016-06-29 14:07:51 +02:00
Florian Festi 3d60aa096b Fix default matrix used when parsing svg path without transform attribute 2016-06-22 23:10:26 +02:00
Florian Festi 1c0ec91fe1 Fix parsing for integer numbers 2016-06-22 23:09:16 +02:00
Florian Festi 43c34e6a42 Fix start of viewport to x=0
as we do not have the place to write a different value anyway.
This fixes the scaling in x direction: gh#7
2016-06-22 10:47:47 +02:00
Florian Festi de3629eb96 Add new file rebased away during cleanup of previous patchset 2016-06-13 18:57:04 +02:00