Shorten some variable names in wgpu::text
This commit is contained in:
parent
0e4a392731
commit
1654c17808
1 changed files with 8 additions and 8 deletions
|
|
@ -495,8 +495,8 @@ fn prepare(
|
||||||
let (
|
let (
|
||||||
buffer,
|
buffer,
|
||||||
bounds,
|
bounds,
|
||||||
horizontal_alignment,
|
align_x,
|
||||||
vertical_alignment,
|
align_y,
|
||||||
color,
|
color,
|
||||||
clip_bounds,
|
clip_bounds,
|
||||||
transformation,
|
transformation,
|
||||||
|
|
@ -550,8 +550,8 @@ fn prepare(
|
||||||
}
|
}
|
||||||
Text::Cached {
|
Text::Cached {
|
||||||
bounds,
|
bounds,
|
||||||
align_x: horizontal_alignment,
|
align_x,
|
||||||
align_y: vertical_alignment,
|
align_y,
|
||||||
color,
|
color,
|
||||||
clip_bounds,
|
clip_bounds,
|
||||||
..
|
..
|
||||||
|
|
@ -566,8 +566,8 @@ fn prepare(
|
||||||
(
|
(
|
||||||
&entry.buffer,
|
&entry.buffer,
|
||||||
Rectangle::new(bounds.position(), entry.min_bounds),
|
Rectangle::new(bounds.position(), entry.min_bounds),
|
||||||
*horizontal_alignment,
|
*align_x,
|
||||||
*vertical_alignment,
|
*align_y,
|
||||||
*color,
|
*color,
|
||||||
*clip_bounds,
|
*clip_bounds,
|
||||||
Transformation::IDENTITY,
|
Transformation::IDENTITY,
|
||||||
|
|
@ -603,7 +603,7 @@ fn prepare(
|
||||||
|
|
||||||
let bounds = bounds * transformation * layer_transformation;
|
let bounds = bounds * transformation * layer_transformation;
|
||||||
|
|
||||||
let left = match horizontal_alignment {
|
let left = match align_x {
|
||||||
Alignment::Default | Alignment::Left | Alignment::Justified => {
|
Alignment::Default | Alignment::Left | Alignment::Justified => {
|
||||||
bounds.x
|
bounds.x
|
||||||
}
|
}
|
||||||
|
|
@ -611,7 +611,7 @@ fn prepare(
|
||||||
Alignment::Right => bounds.x - bounds.width,
|
Alignment::Right => bounds.x - bounds.width,
|
||||||
};
|
};
|
||||||
|
|
||||||
let top = match vertical_alignment {
|
let top = match align_y {
|
||||||
alignment::Vertical::Top => bounds.y,
|
alignment::Vertical::Top => bounds.y,
|
||||||
alignment::Vertical::Center => bounds.y - bounds.height / 2.0,
|
alignment::Vertical::Center => bounds.y - bounds.height / 2.0,
|
||||||
alignment::Vertical::Bottom => bounds.y - bounds.height,
|
alignment::Vertical::Bottom => bounds.y - bounds.height,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue