SVGSurface: Use horizontal and vertial lines
instead for just regular lines. This saves one number per point involved.
This commit is contained in:
parent
9e08691e15
commit
492e7fb4dd
|
@ -455,6 +455,11 @@ Creation date: {date}
|
||||||
if C == "M":
|
if C == "M":
|
||||||
p.append(f"M {x:.3f} {y:.3f}")
|
p.append(f"M {x:.3f} {y:.3f}")
|
||||||
elif C == "L":
|
elif C == "L":
|
||||||
|
if abs(x - x0) < EPS:
|
||||||
|
p.append(f"V {y:.3f}")
|
||||||
|
elif abs(y - y0) < EPS:
|
||||||
|
p.append(f"H {x:.3f}")
|
||||||
|
else:
|
||||||
p.append(f"L {x:.3f} {y:.3f}")
|
p.append(f"L {x:.3f} {y:.3f}")
|
||||||
elif C == "C":
|
elif C == "C":
|
||||||
x1, y1, x2, y2 = c[3:]
|
x1, y1, x2, y2 = c[3:]
|
||||||
|
|
Loading…
Reference in New Issue