mirror of
https://github.com/wez/wezterm.git
synced 2024-11-23 15:04:36 +03:00
fixup basic example for Point changes
This commit is contained in:
parent
c1c61974f8
commit
b0dd3a3803
@ -35,26 +35,23 @@ impl WindowCallbacks for MyWindow {
|
||||
|
||||
// This line doesn't need anti-aliasing
|
||||
context.draw_line(
|
||||
Point { x: 0, y: 0 },
|
||||
Point { x: 100, y: 100 },
|
||||
Point::new(0, 0),
|
||||
Point::new(100, 100),
|
||||
Color::rgb(0xff, 0xff, 0xff),
|
||||
Operator::Over,
|
||||
);
|
||||
|
||||
// This shallower line should need some
|
||||
context.draw_line(
|
||||
Point { x: 100, y: 0 },
|
||||
Point { x: 200, y: 120 },
|
||||
Point::new(100, 0),
|
||||
Point::new(200, 120),
|
||||
Color::rgb(0xff, 0x80, 0xff),
|
||||
Operator::Over,
|
||||
);
|
||||
|
||||
context.draw_line(
|
||||
Point { x: 0, y: 0 },
|
||||
Point {
|
||||
x: self.cursor_pos.0 as isize,
|
||||
y: self.cursor_pos.1 as isize,
|
||||
},
|
||||
Point::new(0, 0),
|
||||
Point::new(self.cursor_pos.0 as isize, self.cursor_pos.1 as isize),
|
||||
Color::rgb(0xff, 0xff, 0x80),
|
||||
Operator::Over,
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user