Skip to content

Commit

Permalink
Tweaks to start debugging parallel initial error
Browse files Browse the repository at this point in the history
  • Loading branch information
jamwaffles committed Nov 29, 2024
1 parent 5816164 commit fceacc0
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions debug-tools/examples/thick-line-mul-256.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,8 @@ fn thickline(

seed_line_error += e_major;
thickness_accumulator += 2 * thickness_dx;
seed_point += seed_step.major;
mul_point += parallel_step_full.minor * -1;
seed_point += seed_step.major * 2;
mul_point += parallel_step_full.minor * -1 * 2;

prev = p;
}
Expand Down Expand Up @@ -444,6 +444,8 @@ fn parallel_line_2(
) -> Result<(), std::convert::Infallible> {
let mut point = start;

point += step.major * 2;

let dx = delta.major;
let dy = delta.minor;

Expand All @@ -469,19 +471,19 @@ fn parallel_line_2(

Pixel(p, c).draw(display)?;

// Draws a pixel connecting a diagonal move into a solid stairstep-looking piece. This is
// required for the additional diagonal move lines that are drawn when stepping in both the
// major and minor directions in the seed line.
if extra {
let p = point + step.minor;
// // Draws a pixel connecting a diagonal move into a solid stairstep-looking piece. This is
// // required for the additional diagonal move lines that are drawn when stepping in both the
// // major and minor directions in the seed line.
// if extra {
// let p = point + step.minor;

let p = Point::new(
if line_is_y_major { p.x >> 8 } else { p.x },
if line_is_y_major { p.y } else { p.y >> 8 },
);
// let p = Point::new(
// if line_is_y_major { p.x >> 8 } else { p.x },
// if line_is_y_major { p.y } else { p.y >> 8 },
// );

Pixel(p, c).draw(display)?;
}
// Pixel(p, c).draw(display)?;
// }

if error > 0 {
point += step.minor;
Expand Down

0 comments on commit fceacc0

Please sign in to comment.