Rename Frame::text to Frame::fill_text

This keeps the API similar to the Web Canvas API.
This commit is contained in:
Héctor Ramón Jiménez 2020-03-07 22:28:57 +01:00
parent f35c9f25f0
commit 37f0d97159

View file

@ -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);
}