1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 21:30:03 -04:00

Improve various documentation

This commit is contained in:
Emil Ernerfeldt
2021-05-20 22:09:35 +02:00
parent 5b462197fa
commit 085233f907
5 changed files with 33 additions and 6 deletions

View File

@@ -1,6 +1,8 @@
use super::*;
/// Describes the width and color of a line.
///
/// The default stroke is the same as [`Stroke::none`].
#[derive(Clone, Copy, Debug, Default, PartialEq)]
#[cfg_attr(feature = "persistence", derive(serde::Deserialize, serde::Serialize))]
pub struct Stroke {
@@ -9,6 +11,7 @@ pub struct Stroke {
}
impl Stroke {
/// Same as [`Stroke::default`].
pub fn none() -> Self {
Self::new(0.0, Color32::TRANSPARENT)
}