diff options
author | 2020-03-07 22:28:57 +0100 | |
---|---|---|
committer | 2020-03-07 22:28:57 +0100 | |
commit | 37f0d97159d81dbd4801e287a06f4e243e483269 (patch) | |
tree | 64c4a08bef9dd29a520550c49170609c2db8ad00 | |
parent | f35c9f25f03976e058e892662454b1143fd172cd (diff) | |
download | iced-37f0d97159d81dbd4801e287a06f4e243e483269.tar.gz iced-37f0d97159d81dbd4801e287a06f4e243e483269.tar.bz2 iced-37f0d97159d81dbd4801e287a06f4e243e483269.zip |
Rename `Frame::text` to `Frame::fill_text`
This keeps the API similar to the Web Canvas API.
-rw-r--r-- | wgpu/src/widget/canvas/frame.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/wgpu/src/widget/canvas/frame.rs b/wgpu/src/widget/canvas/frame.rs index 44a8d9aa..5b82c951 100644 --- a/wgpu/src/widget/canvas/frame.rs +++ b/wgpu/src/widget/canvas/frame.rs @@ -158,11 +158,13 @@ impl Frame { let _ = result.expect("Stroke path"); } - /// Draws the text of the given [`Text`] on the [`Frame`] + /// Draws the characters of the given [`Text`] on the [`Frame`], filling + /// them with the given color. /// /// [`Text`]: struct.Text.html /// [`Frame`]: struct.Frame.html - pub fn text(&mut self, text: Text) { + #[inline] + pub fn fill_text(&mut self, text: Text) { self.texts.push(text); } |