cae  0.0.0
Cross-API graphics engine
Loading...
Searching...
No Matches
utl::Image Struct Reference

Struct for image. More...

#include <Image.hpp>

+ Collaboration diagram for utl::Image:

Public Types

using pixel = unsigned char *
 

Public Member Functions

 Image (const std::filesystem::path &path, bool flip=false)
 Load an image from a file.
 
 ~Image ()
 

Public Attributes

pixel pixels = nullptr
 
int width = 0
 
int height = 0
 
int channels = 0
 

Detailed Description

Struct for image.

Definition at line 19 of file Image.hpp.

Member Typedef Documentation

◆ pixel

using utl::Image::pixel = unsigned char *

Definition at line 22 of file Image.hpp.

Constructor & Destructor Documentation

◆ Image()

utl::Image::Image ( const std::filesystem::path & path,
bool flip = false )
explicit

Load an image from a file.

Parameters
pathPath to the image file
flipWhether to flip the image vertically

Definition at line 8 of file image.cpp.

References channels, height, pixels, and width.

◆ ~Image()

utl::Image::~Image ( )

Definition at line 21 of file image.cpp.

Member Data Documentation

◆ channels

int utl::Image::channels = 0

Definition at line 35 of file Image.hpp.

Referenced by Image().

◆ height

int utl::Image::height = 0

Definition at line 34 of file Image.hpp.

Referenced by Image(), and cae::GLFW::setIcon().

◆ pixels

pixel utl::Image::pixels = nullptr

Definition at line 32 of file Image.hpp.

Referenced by Image(), and cae::GLFW::setIcon().

◆ width

int utl::Image::width = 0

Definition at line 33 of file Image.hpp.

Referenced by Image(), and cae::GLFW::setIcon().


The documentation for this struct was generated from the following files: