Fix misc. output issues

This commit is contained in:
Arne Keller 2021-03-19 19:34:52 +01:00
parent 1895421d68
commit 443212a62b
2 changed files with 5 additions and 3 deletions

View File

@ -301,7 +301,9 @@ where I: IntoIterator<Item = &'a[(Variable, Output)]>
}
text += &print_implicate(x);
}
text.push(')');
if !text.is_empty() {
text.push(')');
}
text
}

View File

@ -114,7 +114,7 @@ pub fn get_svg(size_factor: usize, print_labels: bool,
svg += &line_segment(-offset, y1 * size_factor, -offset, (y2 + 1) * size_factor)
.width(2.0)
.to_string();
svg += &text(-offset - size8 as f32, (y1 + y2 + 1) * size_factor / 2, var_name)
svg += &text(-offset - size8 as f32, (y1 + y2 + 1) * size_factor / 2 + SIZE_FONT as usize / 2, var_name)
.align(Align::Center)
.size(SIZE_FONT)
.to_string();
@ -136,7 +136,7 @@ pub fn get_svg(size_factor: usize, print_labels: bool,
svg += &line_segment(w_base + offset, y1 * size_factor, w_base + offset, (y2 + 1) * size_factor)
.width(2.0)
.to_string();
svg += &text(w_base + offset + size8 as f32, (y1 + y2 + 1) * size_factor / 2, var_name)
svg += &text(w_base + offset + size8 as f32, (y1 + y2 + 1) * size_factor / 2 + SIZE_FONT as usize / 2, var_name)
.align(Align::Center)
.size(SIZE_FONT)
.to_string();