JustAnotherDnDGame 0.1.0
Jeu de rôle tactique au d20, vue de dessus, en C++/Qt
Loading...
Searching...
No Matches
hmi::PixelRegion Struct Reference

Rectangle de pixels modifié par une opération (bornes incluses). More...

#include <PixelOperations.h>

Public Member Functions

constexpr bool empty () const noexcept
constexpr int width () const noexcept
constexpr int height () const noexcept
constexpr bool operator== (const PixelRegion &other) const noexcept

Public Attributes

int minX = 0
int minY = 0
int maxX = -1
 maxX < minX (valeur par défaut) : région vide.
int maxY = -1

Detailed Description

Rectangle de pixels modifié par une opération (bornes incluses).

Sert à borner le coût mémoire de l'historique (hmi::PixelHistory) : une entrée mémorise le contenu de cette région avant/après plutôt qu'une copie complète de l'image.

Member Function Documentation

◆ empty()

bool hmi::PixelRegion::empty ( ) const
inlinenodiscardconstexprnoexcept
Returns
true si la région ne couvre aucun pixel.

◆ height()

int hmi::PixelRegion::height ( ) const
inlinenodiscardconstexprnoexcept
Returns
Hauteur de la région, 0 si vide.

◆ operator==()

bool hmi::PixelRegion::operator== ( const PixelRegion & other) const
inlinenodiscardconstexprnoexcept
Returns
true si les deux régions couvrent exactement les mêmes pixels.

◆ width()

int hmi::PixelRegion::width ( ) const
inlinenodiscardconstexprnoexcept
Returns
Largeur de la région, 0 si vide.

Member Data Documentation

◆ maxX

int hmi::PixelRegion::maxX = -1

maxX < minX (valeur par défaut) : région vide.

◆ maxY

int hmi::PixelRegion::maxY = -1

◆ minX

int hmi::PixelRegion::minX = 0

◆ minY

int hmi::PixelRegion::minY = 0

The documentation for this struct was generated from the following file:
  • /home/runner/work/JustAnotherDnDGame/JustAnotherDnDGame/Source/HMI/Editor/PixelOperations.h