Apply HiDPI to text, images, and clip primitives
Quads are a bit trickier to handle. We may need to change the shaders a bit.
This commit is contained in:
parent
0157121038
commit
db716b3bdf
6 changed files with 112 additions and 58 deletions
|
|
@ -26,6 +26,11 @@ impl Transformation {
|
|||
pub fn translate(x: f32, y: f32) -> Transformation {
|
||||
Transformation(Mat4::from_translation(Vec3::new(x, y, 0.0)))
|
||||
}
|
||||
|
||||
/// Creates a scale transformation.
|
||||
pub fn scale(x: f32, y: f32) -> Transformation {
|
||||
Transformation(Mat4::from_scale(Vec3::new(x, y, 0.0)))
|
||||
}
|
||||
}
|
||||
|
||||
impl Mul for Transformation {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue