bug: fixed a3,a4,a5 format

This commit is contained in:
Ingolf Wagner 2021-05-24 12:00:37 +02:00
parent dfb6e0789e
commit 517ca1194d
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B

View file

@ -117,7 +117,7 @@ impl Context {
let line_size = opt.line_size.clone(); let line_size = opt.line_size.clone();
// todo : this is not correct // todo : this is not correct
let mm = 3.779527547619048; // calculated with inkscape 1587.40157 (px) / 420 (mm) (from a3) let mm = 2.8346456693; // 1mm = 2.8346456693pt
let (mut height, mut width) = match opt.format { let (mut height, mut width) = match opt.format {
None => (f64::from(opt.height.clone()), f64::from(opt.width.clone())), None => (f64::from(opt.height.clone()), f64::from(opt.width.clone())),
Some(format) => match &format[..] { Some(format) => match &format[..] {
@ -129,6 +129,9 @@ impl Context {
}, },
}; };
print!("height: {}\n", height);
print!("width: {}\n", width);
if opt.orientation == "portrait" { if opt.orientation == "portrait" {
let cache = height; let cache = height;
height = width; height = width;