From 07046a3b2c2d0b6a5dfaaab70e5ea71e8334df1b Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Thu, 9 Dec 2021 14:36:32 +0100 Subject: sdl2::image: initial commit Some additional things which were needed to make this work were also added. --- sdl2/rect.ha | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 sdl2/rect.ha (limited to 'sdl2/rect.ha') diff --git a/sdl2/rect.ha b/sdl2/rect.ha new file mode 100644 index 0000000..00fae87 --- /dev/null +++ b/sdl2/rect.ha @@ -0,0 +1,29 @@ +// TODO: Flesh me out + +// The structure that defines a point (integer) +export type point = struct { + x: int, + y: int, +}; + +// The structure that defines a point (floating point) +export type fpoint = struct { + x: f32, + y: f32, +}; + +// A rectangle, with the origin at the upper left (integer). +export type rect = struct { + x: int, + y: int, + w: int, + h: int, +}; + +// A rectangle, with the origin at the upper left (floating point). +export type frect = struct { + x: f32, + y: f32, + w: f32, + h: f32, +}; -- cgit v1.2.3