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:
Héctor Ramón Jiménez 2019-11-05 05:26:20 +01:00
parent 0157121038
commit db716b3bdf
6 changed files with 112 additions and 58 deletions

View file

@ -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 {