summaryrefslogtreecommitdiffstats
path: root/wgpu/src/widget
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-03-07 22:28:57 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-03-07 22:28:57 +0100
commit37f0d97159d81dbd4801e287a06f4e243e483269 (patch)
tree64c4a08bef9dd29a520550c49170609c2db8ad00 /wgpu/src/widget
parentf35c9f25f03976e058e892662454b1143fd172cd (diff)
downloadiced-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.
Diffstat (limited to 'wgpu/src/widget')
-rw-r--r--wgpu/src/widget/canvas/frame.rs6
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);
}