Can set stroke and fill on text and shapes (#551)

* Can set stroke and fill on text and shapes

* resend layout on failed update

* text input properly resets on bad input

* support modifying gradients

* can modify gradients in the properties panel

* updated labels

* remove heap allocation in favor of RC

* removed redundent line

* oops
This commit is contained in:
mfish33
2022-02-15 09:04:11 -08:00
committed by Keavon Chambers
parent 2aba0fc06b
commit ee0718ef5d
17 changed files with 286 additions and 33 deletions
+11 -1
View File
@@ -133,7 +133,7 @@ impl Fill {
}
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Default, Serialize, Deserialize)]
#[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize)]
pub struct Stroke {
color: Color,
width: f32,
@@ -157,6 +157,16 @@ impl Stroke {
}
}
// Having an alpha of 1 to start with leads to a better experience with the properties panel
impl Default for Stroke {
fn default() -> Self {
Self {
width: 0.,
color: Color::from_rgba8(0, 0, 0, 255),
}
}
}
#[repr(C)]
#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
pub struct PathStyle {