File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -31,13 +31,12 @@ struct line {
3131 struct color c ;
3232};
3333
34- // TODO: control points are not tight to the bounds of the curve, so either
35- // 1) explicitly pass bounds, infer i32 control points from that, or
36- // 2) explicitly pass control points as i32s
3734struct bezier2 {
38- uint16_t x0 , y0 ;
39- uint16_t x1 , y1 ;
40- uint16_t x2 , y2 ;
35+ // Control points are wider than u16 to allow expressing
36+ // curves across the whole canvas.
37+ int32_t x0 , y0 ;
38+ int32_t x1 , y1 ;
39+ int32_t x2 , y2 ;
4140 struct color c ;
4241};
4342
Original file line number Diff line number Diff line change @@ -305,7 +305,7 @@ static void test_bezier2(struct canvas *c)
305305 .x0 = c -> width / 4 ,
306306 .y0 = c -> height * 3 / 4 ,
307307 .x1 = c -> width / 2 ,
308- .y1 = 0 ,
308+ .y1 = - c -> height / 3 ,
309309 .x2 = c -> width * 3 / 4 ,
310310 .y2 = c -> height * 3 / 4 ,
311311 .c = FG ,
You can’t perform that action at this time.
0 commit comments