Simplify Canvas
example in documentation
This commit is contained in:
parent
0b5028b1ab
commit
8ade09a0f6
@ -78,7 +78,7 @@ pub use text::Text;
|
||||
/// impl Drawable for Circle {
|
||||
/// fn draw(&self, frame: &mut Frame) {
|
||||
/// // We create a `Path` representing a simple circle
|
||||
/// let circle = Path::new(|p| p.circle(frame.center(), self.radius));
|
||||
/// let circle = Path::circle(frame.center(), self.radius);
|
||||
///
|
||||
/// // And fill it with some color
|
||||
/// frame.fill(&circle, Fill::Color(Color::BLACK));
|
||||
|
Loading…
x
Reference in New Issue
Block a user