colorfull
This commit is contained in:
@@ -67,13 +67,18 @@ impl<Message> canvas::Program<Message> for PolygonFrame {
|
||||
let radius = frame.size().width.min(frame.size().height) / 2.0 - 32.0;
|
||||
let mut vec = Vector::new(0.0, -radius);
|
||||
let c = frame.center();
|
||||
frame.fill_rectangle(
|
||||
iced::Point { x: 0., y: 0. },
|
||||
frame.size(),
|
||||
Color::from_rgb8(27, 60, 83),
|
||||
);
|
||||
// Draw Circle
|
||||
let circle = canvas::Path::circle(frame.center(), radius);
|
||||
frame.stroke(
|
||||
&circle,
|
||||
Stroke {
|
||||
width: 6.0,
|
||||
style: Style::Solid(Color::from_rgba(0.0, 0.0, 0.0, 1.0)),
|
||||
style: Style::Solid(Color::from_rgb8(210, 193, 182)),
|
||||
..Stroke::default()
|
||||
},
|
||||
);
|
||||
@@ -100,7 +105,7 @@ impl<Message> canvas::Program<Message> for PolygonFrame {
|
||||
}
|
||||
|
||||
// Draw the red dot on the current position
|
||||
let dot = canvas::Path::circle(frame.center() + vec.rotate(self.teta), 5.0);
|
||||
let dot = canvas::Path::circle(frame.center() + vec.rotate(self.teta), 10.0);
|
||||
frame.fill(&dot, Color::from_rgb(1.0, 0.0, 0.0));
|
||||
|
||||
// Draw the frame
|
||||
@@ -109,6 +114,7 @@ impl<Message> canvas::Program<Message> for PolygonFrame {
|
||||
frame.size(),
|
||||
Stroke {
|
||||
width: 16.0,
|
||||
style: Style::Solid(Color::from_rgb8(207, 74, 28)),
|
||||
..Stroke::default()
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user