We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4eebb62 commit 50161bcCopy full SHA for 50161bc
src/convert/svg.rs
@@ -207,7 +207,15 @@ impl SvgBuilder {
207
}
208
209
let mut placed_coord_x = (self.margin * 2 + n) as f64 - border_size;
210
- placed_coord_x = (placed_coord_x / 2f64).ceil();
+
211
+ // Adjust for non-integer initial x coordinates so as not to partially cover bits by rounding down.
212
+ if placed_coord_x % 2f64 != 0f64 {
213
+ placed_coord_x += 1f64;
214
+ border_size -= 1f64;
215
+ }
216
217
+ placed_coord_x = placed_coord_x / 2f64;
218
219
let mut placed_coord = (placed_coord_x, placed_coord_x);
220
221
if let Some((x, y)) = self.image_position {
0 commit comments