File tree Expand file tree Collapse file tree 1 file changed +27
-11
lines changed Expand file tree Collapse file tree 1 file changed +27
-11
lines changed Original file line number Diff line number Diff line change @@ -178,7 +178,18 @@ fn thickline(
178
178
let mut mul_point = mul_line. start ;
179
179
let mut seed_point = mul_seed. start ;
180
180
181
- dbg ! ( seed_point, seed_step, seed_is_y_major) ;
181
+ let mut prev = Point :: new (
182
+ if seed_is_y_major {
183
+ seed_point. x >> 8
184
+ } else {
185
+ seed_point. x
186
+ } ,
187
+ if seed_is_y_major {
188
+ seed_point. y
189
+ } else {
190
+ seed_point. y >> 8
191
+ } ,
192
+ ) ;
182
193
183
194
while thickness_accumulator. pow ( 2 ) <= thickness_threshold {
184
195
let p = Point :: new (
@@ -233,18 +244,21 @@ fn thickline(
233
244
if seed_line_error > 0 {
234
245
seed_line_error += e_minor;
235
246
236
- mul_point += parallel_step_full. major ;
237
247
seed_point += seed_step. minor ;
238
248
239
- // parallel_line_2(
240
- // mul_point,
241
- // parallel_is_y_major,
242
- // parallel_step,
243
- // parallel_delta,
244
- // Rgb888::CSS_AQUAMARINE,
245
- // display,
246
- // true,
247
- // )?;
249
+ if prev. x != p. x {
250
+ mul_point += parallel_step_full. major ;
251
+ }
252
+
253
+ parallel_line_2 (
254
+ mul_point,
255
+ parallel_is_y_major,
256
+ parallel_step,
257
+ parallel_delta,
258
+ Rgb888 :: CSS_AQUAMARINE ,
259
+ display,
260
+ true ,
261
+ ) ?;
248
262
249
263
thickness_accumulator += 2 * thickness_dy;
250
264
} else {
@@ -263,6 +277,8 @@ fn thickline(
263
277
thickness_accumulator += 2 * thickness_dx;
264
278
seed_point += seed_step. major ;
265
279
mul_point += parallel_step_full. minor * -1 ;
280
+
281
+ prev = p;
266
282
}
267
283
268
284
// if extra {
You can’t perform that action at this time.
0 commit comments