Draft basic text rendering using wgpu_glyph

This commit is contained in:
Héctor Ramón Jiménez 2019-10-05 05:12:36 +02:00
parent a90f7fcb98
commit 0c3f78713d
4 changed files with 221 additions and 49 deletions

View file

@ -41,6 +41,15 @@ where
}
}
pub fn draw(
&self,
renderer: &mut Renderer,
layout: Layout<'_>,
cursor_position: Point,
) -> Renderer::Primitive {
self.widget.draw(renderer, layout, cursor_position)
}
/// Applies a transformation to the produced message of the [`Element`].
///
/// This method is useful when you want to decouple different parts of your