From fe2baedc760c2f29e2c720f6b1132a2de33c5430 Mon Sep 17 00:00:00 2001 From: Mel Date: Sat, 8 Jul 2023 03:25:44 +0200 Subject: Use own size types --- src/GFX/Image/RawImage.hpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'src/GFX/Image/RawImage.hpp') diff --git a/src/GFX/Image/RawImage.hpp b/src/GFX/Image/RawImage.hpp index 809ddd9..5a95dad 100644 --- a/src/GFX/Image/RawImage.hpp +++ b/src/GFX/Image/RawImage.hpp @@ -1,7 +1,6 @@ #pragma once -#include -#include +#include "../../Common/Sizes.hpp" #include #include @@ -11,26 +10,26 @@ class RawImage { public: RawImage() : m_width(0), m_height(0) {} - RawImage(uint32_t width, uint32_t height) : m_width(width), m_height(height) { + RawImage(U32 width, U32 height) : m_width(width), m_height(height) { m_pixels.reserve(width * height); } struct Pixel { - uint8_t r, g, b, a; + U8 r, g, b, a; }; void add(Pixel pixel); - size_t size() const; - uint8_t* raw() const; + USize size() const; + U8* raw() const; - uint32_t width() const; - uint32_t height() const; + U32 width() const; + U32 height() const; std::string string() const; private: std::vector m_pixels; - uint32_t m_width, m_height; + U32 m_width, m_height; }; } -- cgit 1.4.1