Apply Transformation to RawText primitives
This commit is contained in:
parent
a06682ff42
commit
b3adf31845
3 changed files with 21 additions and 19 deletions
|
|
@ -181,20 +181,13 @@ impl<'a> Layer<'a> {
|
|||
clip_bounds: *clip_bounds * transformation,
|
||||
}));
|
||||
}
|
||||
graphics::Primitive::RawText(graphics::text::Raw {
|
||||
buffer,
|
||||
position,
|
||||
color,
|
||||
clip_bounds,
|
||||
}) => {
|
||||
graphics::Primitive::RawText(raw) => {
|
||||
let layer = &mut layers[current_layer];
|
||||
|
||||
layer.text.push(Text::Raw(graphics::text::Raw {
|
||||
buffer: buffer.clone(),
|
||||
position: *position * transformation,
|
||||
color: *color,
|
||||
clip_bounds: *clip_bounds * transformation,
|
||||
}));
|
||||
layer.text.push(Text::Raw {
|
||||
raw: raw.clone(),
|
||||
transformation,
|
||||
});
|
||||
}
|
||||
Primitive::Quad {
|
||||
bounds,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue