How to display svg image with a negative size with svg write in python?

41 Views Asked by At

While Parsing from a xml file i have a rectangle with negative values. I am trying to convert this to a svg file, but i can' seem to display the rectangle if it has negative value? Does anyone know a solution ?

The goal is that if the coordination changes it also automatic changes. So doing this manually is not a option.

I tried adding negative values for the size but it just doesn't show the rectangle if i change everything to positive it does show the rectangle.

import numpy as np
from Parsing_ASD_18_244_KW_0001_WM0230BaseanlogROB import *
import svgwrite
svg_document = svgwrite.Drawing(filename = "ASD_18_244_KW_0001_WM0230BaseanlogROB.svg",
                                size = ('-100%','-400'))
svg_document.add(svg_document.rect(insert = (-20,-20),size=("-399","-128"),stroke_width ="1",stroke ="black")
print(svg_document.tostring())
svg_document.save()
0

There are 0 best solutions below