Implement Widget::draw for Text
This commit is contained in:
parent
03b3493138
commit
3a0c503db9
11 changed files with 128 additions and 32 deletions
|
|
@ -74,7 +74,7 @@ impl<'a> Layer<'a> {
|
|||
/// Distributes the given [`Primitive`] and generates a list of layers based
|
||||
/// on its contents.
|
||||
pub fn generate(
|
||||
primitive: &'a Primitive,
|
||||
primitives: &'a [Primitive],
|
||||
viewport: &Viewport,
|
||||
) -> Vec<Self> {
|
||||
let first_layer =
|
||||
|
|
@ -82,12 +82,14 @@ impl<'a> Layer<'a> {
|
|||
|
||||
let mut layers = vec![first_layer];
|
||||
|
||||
Self::process_primitive(
|
||||
&mut layers,
|
||||
Vector::new(0.0, 0.0),
|
||||
primitive,
|
||||
0,
|
||||
);
|
||||
for primitive in primitives {
|
||||
Self::process_primitive(
|
||||
&mut layers,
|
||||
Vector::new(0.0, 0.0),
|
||||
primitive,
|
||||
0,
|
||||
);
|
||||
}
|
||||
|
||||
layers
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue