summaryrefslogtreecommitdiffstats
path: root/glow/src/viewport.rs
diff options
context:
space:
mode:
Diffstat (limited to 'glow/src/viewport.rs')
-rw-r--r--glow/src/viewport.rs33
1 files changed, 0 insertions, 33 deletions
diff --git a/glow/src/viewport.rs b/glow/src/viewport.rs
deleted file mode 100644
index c1afee87..00000000
--- a/glow/src/viewport.rs
+++ /dev/null
@@ -1,33 +0,0 @@
-use crate::Transformation;
-
-/// A viewing region for displaying computer graphics.
-#[derive(Debug)]
-pub struct Viewport {
- width: u32,
- height: u32,
- transformation: Transformation,
-}
-
-impl Viewport {
- /// Creates a new [`Viewport`] with the given dimensions.
- pub fn new(width: u32, height: u32) -> Viewport {
- Viewport {
- width,
- height,
- transformation: Transformation::orthographic(width, height),
- }
- }
-
- pub fn height(&self) -> u32 {
- self.height
- }
-
- /// Returns the dimensions of the [`Viewport`].
- pub fn dimensions(&self) -> (u32, u32) {
- (self.width, self.height)
- }
-
- pub(crate) fn transformation(&self) -> Transformation {
- self.transformation
- }
-}