Symphony Of Empires
Eng3D::BinaryImage Struct Reference

This binary image class helps load images and visual resources from the disk; the binary image IS NOT a texture, it is intended to be used in contextes which are NOT rendering - for rendering purpouses see texture class from client's implementation. More...

#include <binary_image.hpp>

Inheritance diagram for Eng3D::BinaryImage:

Public Member Functions

 BinaryImage ()=default
 
 BinaryImage (const Eng3D::IO::Path &path)
 
 BinaryImage (size_t _width, size_t _height, size_t bpp=32)
 
 BinaryImage (const BinaryImage &tex)
 
BinaryImageoperator= (const BinaryImage &)=delete
 
virtual ~BinaryImage ()=default
 
virtual void from_file (const Eng3D::IO::Path &path)
 
virtual void to_file (const std::string &filename)
 
Eng3D::Color get_pixel (size_t x, size_t y) const
 Obtains a pixel from the binary image. More...
 

Public Attributes

std::unique_ptr< uint32_t[]> buffer
 
size_t width
 
size_t height
 
size_t bpp
 

Detailed Description

This binary image class helps load images and visual resources from the disk; the binary image IS NOT a texture, it is intended to be used in contextes which are NOT rendering - for rendering purpouses see texture class from client's implementation.

Definition at line 53 of file binary_image.hpp.

Constructor & Destructor Documentation

◆ BinaryImage() [1/4]

Eng3D::BinaryImage::BinaryImage ( )
default

◆ BinaryImage() [2/4]

Eng3D::BinaryImage::BinaryImage ( const Eng3D::IO::Path path)

Definition at line 43 of file binary_image.cpp.

Here is the call graph for this function:

◆ BinaryImage() [3/4]

Eng3D::BinaryImage::BinaryImage ( size_t  _width,
size_t  _height,
size_t  bpp = 32 
)

Definition at line 47 of file binary_image.cpp.

◆ BinaryImage() [4/4]

Eng3D::BinaryImage::BinaryImage ( const BinaryImage tex)

Definition at line 60 of file binary_image.cpp.

◆ ~BinaryImage()

virtual Eng3D::BinaryImage::~BinaryImage ( )
virtualdefault

Member Function Documentation

◆ from_file()

void Eng3D::BinaryImage::from_file ( const Eng3D::IO::Path path)
virtual

Definition at line 68 of file binary_image.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_pixel()

Eng3D::Color Eng3D::BinaryImage::get_pixel ( size_t  x,
size_t  y 
) const
inline

Obtains a pixel from the binary image.

Parameters
xX coordinate
yY coordinate
Returns
uint32_t The colour

Definition at line 67 of file binary_image.hpp.

Here is the call graph for this function:

◆ operator=()

BinaryImage& Eng3D::BinaryImage::operator= ( const BinaryImage )
delete

◆ to_file()

void Eng3D::BinaryImage::to_file ( const std::string &  filename)
virtual

Reimplemented in Eng3D::Texture.

Definition at line 84 of file binary_image.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ bpp

size_t Eng3D::BinaryImage::bpp

Definition at line 79 of file binary_image.hpp.

◆ buffer

std::unique_ptr<uint32_t[]> Eng3D::BinaryImage::buffer

Definition at line 77 of file binary_image.hpp.

◆ height

size_t Eng3D::BinaryImage::height

Definition at line 78 of file binary_image.hpp.

◆ width

size_t Eng3D::BinaryImage::width

Definition at line 78 of file binary_image.hpp.


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