From 37f0d97159d81dbd4801e287a06f4e243e483269 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sat, 7 Mar 2020 22:28:57 +0100 Subject: Rename `Frame::text` to `Frame::fill_text` This keeps the API similar to the Web Canvas API. --- wgpu/src/widget/canvas/frame.rs | 6 ++++-- 1 file 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); } -- cgit