1
0
Fork 0
forked from wry/wry

render: simplify buffer coordinates

This commit is contained in:
Julian Orth 2024-02-27 23:44:05 +01:00
parent 85c11448fb
commit 7d3b8b6278
10 changed files with 337 additions and 419 deletions

View file

@ -403,3 +403,25 @@ pub fn set_gfx_api(gfx_api: GfxApi) {
pub fn set_direct_scanout_enabled(enabled: bool) {
get!().set_direct_scanout_enabled(None, enabled);
}
/// A transformation.
#[derive(Serialize, Deserialize, Copy, Clone, Debug, Eq, PartialEq, Hash, Default)]
pub enum Transform {
/// No transformation.
#[default]
None,
/// Rotate 90 degrees counter-clockwise.
Rotate90,
/// Rotate 180 degrees counter-clockwise.
Rotate180,
/// Rotate 270 degrees counter-clockwise.
Rotate270,
/// Flip around the vertical axis.
Flip,
/// Flip around the vertical axis, then rotate 90 degrees counter-clockwise.
FlipRotate90,
/// Flip around the vertical axis, then rotate 180 degrees counter-clockwise.
FlipRotate180,
/// Flip around the vertical axis, then rotate 270 degrees counter-clockwise.
FlipRotate270,
}