Gamp v0.0.7-54-gccdc599
Gamp: Graphics, Audio, Multimedia and Processing
Loading...
Searching...
No Matches
gamp::render::pixel::GenericPixelRect Class Reference

Generic PixelRectangle implementation. More...

#include <PixelFormat.hpp>

Inheritance diagram for gamp::render::pixel::GenericPixelRect:
Collaboration diagram for gamp::render::pixel::GenericPixelRect:

Public Member Functions

 GenericPixelRect (const GenericPixelRect &o) noexcept=delete
 
 GenericPixelRect (const PixelFormat &pixelformat, const Point2u32 &size, uint32_t strideInBytes, bool isGLOriented)
 
 GenericPixelRect (GenericPixelRect &&o) noexcept
 
const PixelFormatformat () const noexcept override
 Returns the PixelFormat.
 
size_t hashCode () const noexcept override
 
bool isGLOriented () const noexcept override
 Returns true if the memory is laid out in OpenGL's coordinate system, origin at bottom left.
 
uint8_t * mutablePixels () noexcept override
 Returns the pixels, mutable.
 
GenericPixelRectoperator= (const GenericPixelRect &) noexcept=delete
 
GenericPixelRectoperator= (GenericPixelRect &&o) noexcept
 
const uint8_t * pixels () const noexcept override
 Returns the pixels.
 
const Point2u32size () const noexcept override
 Returns the size, i.e.
 
uint32_t stride () const noexcept override
 Returns stride in byte-size, i.e.
 
std::string toString () const override
 
- Public Member Functions inherited from gamp::render::pixel::PixelRectangle
 ~PixelRectangle () noexcept=default
 

Protected Member Functions

size_t pixelHashCode () const noexcept
 

Protected Attributes

std::vector< uint8_t > m_data
 
size_t m_hashCode = 0
 
jau::sc_atomic_bool m_hashCodeComputed = false
 
bool m_isGLOriented
 
std::mutex m_mtx
 
const PixelFormatm_pixelformat
 
Point2u32 m_size
 
uint32_t m_strideInBytes
 

Detailed Description

Generic PixelRectangle implementation.

Definition at line 322 of file PixelFormat.hpp.

Constructor & Destructor Documentation

◆ GenericPixelRect() [1/3]

gamp::render::pixel::GenericPixelRect::GenericPixelRect ( const PixelFormat & pixelformat,
const Point2u32 & size,
uint32_t strideInBytes,
bool isGLOriented )
inline
Parameters
pixelformat
size
strideInBytesstride in byte-size, i.e. byte count from one line to the next. If not zero, value must be >= width * bytes-per-pixel. If zero, stride is set to width * bytes-per-pixel.
isGLOriented
Exceptions
IllegalArgumentExceptionif strideInBytes is invalid.
IndexOutOfBoundsExceptionif pixels has insufficient bytes left

Definition at line 357 of file PixelFormat.hpp.

Here is the caller graph for this function:

◆ GenericPixelRect() [2/3]

gamp::render::pixel::GenericPixelRect::GenericPixelRect ( const GenericPixelRect & o)
deletenoexcept

◆ GenericPixelRect() [3/3]

gamp::render::pixel::GenericPixelRect::GenericPixelRect ( GenericPixelRect && o)
inlinenoexcept

Definition at line 378 of file PixelFormat.hpp.

Member Function Documentation

◆ pixelHashCode()

size_t gamp::render::pixel::GenericPixelRect::pixelHashCode ( ) const
inlineprotectednoexcept

Definition at line 333 of file PixelFormat.hpp.

Here is the caller graph for this function:

◆ operator=() [1/2]

GenericPixelRect & gamp::render::pixel::GenericPixelRect::operator= ( const GenericPixelRect & )
deletenoexcept

◆ operator=() [2/2]

GenericPixelRect & gamp::render::pixel::GenericPixelRect::operator= ( GenericPixelRect && o)
inlinenoexcept

Definition at line 382 of file PixelFormat.hpp.

◆ hashCode()

size_t gamp::render::pixel::GenericPixelRect::hashCode ( ) const
inlineoverridevirtualnoexcept

Computes a hash code over:

  • pixelformat
  • size
  • stride
  • isGLOriented
  • pixels

The hashCode shall be computed only once with first call and stored for later retrieval to enhance performance.

Computes a hash code over:

  • pixelformat
  • size
  • stride
  • isGLOriented
  • pixels
The hashCode shall be computed only once with first call and stored for later retrieval to enhance performance.

Implements gamp::render::pixel::PixelRectangle.

Definition at line 394 of file PixelFormat.hpp.

◆ format()

const PixelFormat & gamp::render::pixel::GenericPixelRect::format ( ) const
inlineoverridevirtualnoexcept

Returns the PixelFormat.

Implements gamp::render::pixel::PixelRectangle.

Definition at line 411 of file PixelFormat.hpp.

Here is the caller graph for this function:

◆ size()

const Point2u32 & gamp::render::pixel::GenericPixelRect::size ( ) const
inlineoverridevirtualnoexcept

Returns the size, i.e.

width and height.

Implements gamp::render::pixel::PixelRectangle.

Definition at line 413 of file PixelFormat.hpp.

Here is the caller graph for this function:

◆ stride()

uint32_t gamp::render::pixel::GenericPixelRect::stride ( ) const
inlineoverridevirtualnoexcept

Returns stride in byte-size, i.e.

byte count from one line to the next.

Must be >= getPixelformat().bytesPerPixel() * getSize().getWidth().

Implements gamp::render::pixel::PixelRectangle.

Definition at line 415 of file PixelFormat.hpp.

Here is the caller graph for this function:

◆ isGLOriented()

bool gamp::render::pixel::GenericPixelRect::isGLOriented ( ) const
inlineoverridevirtualnoexcept

Returns true if the memory is laid out in OpenGL's coordinate system, origin at bottom left.

Otherwise returns false, i.e. origin at top left.

Implements gamp::render::pixel::PixelRectangle.

Definition at line 417 of file PixelFormat.hpp.

Here is the caller graph for this function:

◆ pixels()

const uint8_t * gamp::render::pixel::GenericPixelRect::pixels ( ) const
inlineoverridevirtualnoexcept

Returns the pixels.

Implements gamp::render::pixel::PixelRectangle.

Definition at line 419 of file PixelFormat.hpp.

◆ mutablePixels()

uint8_t * gamp::render::pixel::GenericPixelRect::mutablePixels ( )
inlineoverridevirtualnoexcept

Returns the pixels, mutable.

Implements gamp::render::pixel::PixelRectangle.

Definition at line 420 of file PixelFormat.hpp.

Here is the caller graph for this function:

◆ toString()

std::string gamp::render::pixel::GenericPixelRect::toString ( ) const
inlineoverridevirtual

Implements gamp::render::pixel::PixelRectangle.

Definition at line 422 of file PixelFormat.hpp.

Member Data Documentation

◆ m_pixelformat

const PixelFormat* gamp::render::pixel::GenericPixelRect::m_pixelformat
protected

Definition at line 324 of file PixelFormat.hpp.

◆ m_size

Point2u32 gamp::render::pixel::GenericPixelRect::m_size
protected

Definition at line 325 of file PixelFormat.hpp.

◆ m_strideInBytes

uint32_t gamp::render::pixel::GenericPixelRect::m_strideInBytes
protected

Definition at line 326 of file PixelFormat.hpp.

◆ m_isGLOriented

bool gamp::render::pixel::GenericPixelRect::m_isGLOriented
protected

Definition at line 327 of file PixelFormat.hpp.

◆ m_data

std::vector<uint8_t> gamp::render::pixel::GenericPixelRect::m_data
protected

Definition at line 328 of file PixelFormat.hpp.

◆ m_hashCode

size_t gamp::render::pixel::GenericPixelRect::m_hashCode = 0
mutableprotected

Definition at line 329 of file PixelFormat.hpp.

◆ m_hashCodeComputed

jau::sc_atomic_bool gamp::render::pixel::GenericPixelRect::m_hashCodeComputed = false
mutableprotected

Definition at line 330 of file PixelFormat.hpp.

◆ m_mtx

std::mutex gamp::render::pixel::GenericPixelRect::m_mtx
mutableprotected

Definition at line 331 of file PixelFormat.hpp.


The documentation for this class was generated from the following file: