Grok 20.3.2
grk::Buffer2d< T, A > Struct Template Reference

#include <buffer.h>

Inheritance diagram for grk::Buffer2d< T, A >:
grk::Buffer< T, A > grk::Rect< uint32_t >

Classes

struct  memcpy_from

Public Member Functions

 Buffer2d (T *buffer, bool ownsData, uint32_t w, uint32_t strd, uint32_t h)
 Buffer2d (uint32_t w, uint32_t h)
 Buffer2d (const Rect32 *b)
 Buffer2d (const Rect32 &b)
 Buffer2d (const Rect32 &b, bool useOrigin)
 Buffer2d (void)
 Buffer2d (const Buffer2d &rhs)
 Buffer2d (Buffer2d &rhs, bool transferBuffer)
 Construct a new Buffer2d object Copies Rect32 and transfers buffer.
Buffer2dSimple< T > simple (void) const
Buffer2dSimple< float > simpleF (void) const
Buffer2doperator= (const Buffer2d &rhs)
Buffer2doperator= (const Buffer2d *rhs)
virtual ~Buffer2d () override=default
size_t length (void)
bool alloc2d (uint32_t w, uint32_t str, uint32_t h, bool clear)
void clear (void)
uint32_t alignedBufferWidth (uint32_t width)
bool alloc2d (bool clear)
void dealloc () override
void attach (T *buffer, uint32_t strd)
void attach (Buffer2d &rhs, uint32_t x, uint32_t y)
void attach (Buffer2d &rhs)
void attach (Buffer2d *rhs, uint32_t x, uint32_t y)
void attach (Buffer2d *rhs)
void transfer (T **buffer, uint32_t *strd)
template<typename F>
void copyFrom (const Buffer2d &src, F filter)
template<typename F>
void copyFrom (const Buffer2d *src, F filter)
template<typename SrcT, template< class > class SrcA, typename F>
void copyFromNarrow (const Buffer2d< SrcT, SrcA > *src, F filter)
void copyFrom (const Buffer2d &src)
T * getBuffer (void) const
T * address (uint32_t x, uint32_t y)
uint32_t getStride ()
Public Member Functions inherited from grk::Rect< uint32_t >
 Rect (uint32_t origin_x0, uint32_t origin_y0, uint32_t x0, uint32_t y0, uint32_t x1, uint32_t y1)
 Rect (uint32_t x0, uint32_t y0, uint32_t x1, uint32_t y1)
 Rect (const Rect &rhs)
 Rect (const Rect *rhs)
 Rect (void)
virtual ~Rect ()=default
Rect< uint32_t > & setOrigin (uint32_t origx, uint32_t origy, bool absolute)
Rect< uint32_t > & setOrigin (const Rect< uint32_t > &rhs, bool absolute)
Rect< uint32_t > & setOrigin (const Rect< uint32_t > *rhs, bool absolute)
Rect< uint32_t > & toRelative (void)
Rect< uint32_t > & toAbsolute (void)
virtual void print (void) const
bool valid (void) const
bool empty (void) const
bool contains (Point< uint32_t > pt)
bool contains (uint32_t x, uint32_t y)
Rect< uint32_t > & operator= (const Rect &rhs)
Rect< uint32_t > & operator= (const Rect *rhs)
bool operator!= (const Rect &other) const
bool operator== (const Rect &rhs) const
void setRect (const Rect *rhs)
void setRect (const Rect &rhs)
Rect< uint32_t > scaleDownCeil (uint32_t den) const
Rect< uint32_t > scale (uint32_t scalex, uint32_t scaley) const
Rect< uint32_t > scaleDown (uint64_t denx, uint64_t deny) const
Rect< uint32_t > scaleDownPow2 (uint8_t powx, uint8_t powy) const
Rect< uint32_t > scaleDownPow2 (Point8 pow) const
Rect< uint32_t > scaleDownCeil (uint64_t denx, uint64_t deny) const
Rect< uint32_t > scaleDownCeilPow2 (uint8_t power) const
Rect< uint32_t > scaleDownCeilPow2 (uint8_t powx, uint8_t powy) const
Rect< uint32_t > intersection (const Rect< uint32_t > &rhs) const
Rect< uint32_t > clip (const Rect *rhs) const
Rect< uint32_t > clip (const Rect32_16 &rhs) const
Rect< uint32_t > clip (const Rect32_16 *rhs) const
Rect< uint32_t > clip (const Rect &rhs) const
Rect< uint32_t > & clip_IN_PLACE (const Rect &rhs)
Rect< uint32_t > intersection (const Rect *rhs) const
bool nonEmptyIntersection (const Rect *rhs) const
bool nonEmptyIntersection (const Rect32_16 *rhs) const
Rect< uint32_t > rectUnion (const Rect *rhs) const
Rect< uint32_t > rectUnion (const Rect &rhs) const
uint64_t area (void) const
uint32_t width () const
uint32_t height () const
Line< uint32_t > dimX () const
Line< uint32_t > dimY () const
Rect< uint32_t > pan (int64_t x, int64_t y) const
Rect< uint32_t > & pan_IN_PLACE (int64_t x, int64_t y)
Rect< uint32_t > & grow_IN_PLACE (uint32_t boundary)
Rect< uint32_t > & grow_IN_PLACE (uint32_t boundaryx, uint32_t boundaryy)
Rect< uint32_t > & grow_IN_PLACE (uint32_t boundary, uint32_t maxX, uint32_t maxY)
Rect< uint32_t > & grow_IN_PLACE (uint32_t boundaryx, uint32_t boundaryy, uint32_t maxX, uint32_t maxY)
Rect< uint32_t > & grow_IN_PLACE (uint32_t boundary, const Rect< uint32_t > &bounds)
Rect< uint32_t > & grow_IN_PLACE (uint32_t boundaryx, uint32_t boundaryy, Rect bounds)

Protected Attributes

uint32_t stride
Protected Attributes inherited from grk::Buffer< T, A >
T * buf_
size_t offset_
size_t num_elts_
bool owns_data_
Protected Attributes inherited from grk::Rect< uint32_t >
bool absoluteCoordinates
uint32_t origin_x0
uint32_t origin_y0
uint32_t x0
uint32_t y0
uint32_t x1
uint32_t y1

Additional Inherited Members

Public Attributes inherited from grk::Rect< uint32_t >
bool absoluteCoordinates
uint32_t origin_x0
uint32_t origin_y0
uint32_t x0
uint32_t y0
uint32_t x1
uint32_t y1
Protected Member Functions inherited from grk::Buffer< T, A >
 Buffer (T *buffer, size_t off, size_t length, bool ownsData)
 Buffer (T *buffer, size_t length)
 Buffer ()
 Buffer (T *buffer, size_t length, bool ownsData)
virtual ~Buffer ()
 Buffer (const Buffer &rhs)
Bufferoperator= (const Buffer &rhs)
Bufferoperator= (const Buffer *rhs)
bool canRead (void)
read (void)
bool write (T val)
bool write (T *b, size_t size)
virtual bool alloc (size_t length)
void attach (T *buffer)
void transfer (T **buffer)
size_t remainingLength (void) const
bool increment_offset (std::ptrdiff_t off)
T * currPtr (void) const
T * currPtr (size_t required_length) const
bool owns_data ()
void set_owns_data (bool owns)
size_t num_elts () const
size_t * num_elts_ptr ()
void set_num_elts (size_t elts)
size_t offset () const
void set_offset (size_t off)
T * buf () const
T ** ptr_to_buf ()
void set_buf (T *buf, size_t elts)
Protected Member Functions inherited from grk::Rect< uint32_t >
 Rect (uint32_t origin_x0, uint32_t origin_y0, uint32_t x0, uint32_t y0, uint32_t x1, uint32_t y1)
 Rect (uint32_t x0, uint32_t y0, uint32_t x1, uint32_t y1)
 Rect (const Rect &rhs)
 Rect (const Rect *rhs)
 Rect (void)
virtual ~Rect ()=default
Rect< uint32_t > & setOrigin (uint32_t origx, uint32_t origy, bool absolute)
Rect< uint32_t > & setOrigin (const Rect< uint32_t > &rhs, bool absolute)
Rect< uint32_t > & setOrigin (const Rect< uint32_t > *rhs, bool absolute)
Rect< uint32_t > & toRelative (void)
Rect< uint32_t > & toAbsolute (void)
virtual void print (void) const
bool valid (void) const
bool empty (void) const
bool contains (Point< uint32_t > pt)
bool contains (uint32_t x, uint32_t y)
Rect< uint32_t > & operator= (const Rect &rhs)
Rect< uint32_t > & operator= (const Rect *rhs)
bool operator!= (const Rect &other) const
bool operator== (const Rect &rhs) const
void setRect (const Rect *rhs)
void setRect (const Rect &rhs)
Rect< uint32_t > scaleDownCeil (uint32_t den) const
Rect< uint32_t > scale (uint32_t scalex, uint32_t scaley) const
Rect< uint32_t > scaleDown (uint64_t denx, uint64_t deny) const
Rect< uint32_t > scaleDownPow2 (uint8_t powx, uint8_t powy) const
Rect< uint32_t > scaleDownPow2 (Point8 pow) const
Rect< uint32_t > scaleDownCeil (uint64_t denx, uint64_t deny) const
Rect< uint32_t > scaleDownCeilPow2 (uint8_t power) const
Rect< uint32_t > scaleDownCeilPow2 (uint8_t powx, uint8_t powy) const
Rect< uint32_t > intersection (const Rect< uint32_t > &rhs) const
Rect< uint32_t > clip (const Rect *rhs) const
Rect< uint32_t > clip (const Rect32_16 &rhs) const
Rect< uint32_t > clip (const Rect32_16 *rhs) const
Rect< uint32_t > clip (const Rect &rhs) const
Rect< uint32_t > & clip_IN_PLACE (const Rect &rhs)
Rect< uint32_t > intersection (const Rect *rhs) const
bool nonEmptyIntersection (const Rect *rhs) const
bool nonEmptyIntersection (const Rect32_16 *rhs) const
Rect< uint32_t > rectUnion (const Rect *rhs) const
Rect< uint32_t > rectUnion (const Rect &rhs) const
uint64_t area (void) const
uint32_t width () const
uint32_t height () const
Line< uint32_t > dimX () const
Line< uint32_t > dimY () const
Rect< uint32_t > pan (int64_t x, int64_t y) const
Rect< uint32_t > & pan_IN_PLACE (int64_t x, int64_t y)
Rect< uint32_t > & grow_IN_PLACE (uint32_t boundary)
Rect< uint32_t > & grow_IN_PLACE (uint32_t boundaryx, uint32_t boundaryy)
Rect< uint32_t > & grow_IN_PLACE (uint32_t boundary, uint32_t maxX, uint32_t maxY)
Rect< uint32_t > & grow_IN_PLACE (uint32_t boundaryx, uint32_t boundaryy, uint32_t maxX, uint32_t maxY)
Rect< uint32_t > & grow_IN_PLACE (uint32_t boundary, const Rect< uint32_t > &bounds)
Rect< uint32_t > & grow_IN_PLACE (uint32_t boundaryx, uint32_t boundaryy, Rect bounds)

Constructor & Destructor Documentation

◆ Buffer2d() [1/8]

template<typename T, template< typename TT > typename A>
grk::Buffer2d< T, A >::Buffer2d ( T * buffer,
bool ownsData,
uint32_t w,
uint32_t strd,
uint32_t h )
inline

◆ Buffer2d() [2/8]

template<typename T, template< typename TT > typename A>
grk::Buffer2d< T, A >::Buffer2d ( uint32_t w,
uint32_t h )
inline

◆ Buffer2d() [3/8]

template<typename T, template< typename TT > typename A>
grk::Buffer2d< T, A >::Buffer2d ( const Rect32 * b)
inlineexplicit

◆ Buffer2d() [4/8]

template<typename T, template< typename TT > typename A>
grk::Buffer2d< T, A >::Buffer2d ( const Rect32 & b)
inlineexplicit

◆ Buffer2d() [5/8]

template<typename T, template< typename TT > typename A>
grk::Buffer2d< T, A >::Buffer2d ( const Rect32 & b,
bool useOrigin )
inline

◆ Buffer2d() [6/8]

template<typename T, template< typename TT > typename A>
grk::Buffer2d< T, A >::Buffer2d ( void )
inline

◆ Buffer2d() [7/8]

template<typename T, template< typename TT > typename A>
grk::Buffer2d< T, A >::Buffer2d ( const Buffer2d< T, A > & rhs)
inlineexplicit

◆ Buffer2d() [8/8]

template<typename T, template< typename TT > typename A>
grk::Buffer2d< T, A >::Buffer2d ( Buffer2d< T, A > & rhs,
bool transferBuffer )
inline

Construct a new Buffer2d object Copies Rect32 and transfers buffer.

Parameters
rhsright hand side
transferBuffermust always be true

◆ ~Buffer2d()

template<typename T, template< typename TT > typename A>
virtual grk::Buffer2d< T, A >::~Buffer2d ( )
overridevirtualdefault

Member Function Documentation

◆ address()

template<typename T, template< typename TT > typename A>
T * grk::Buffer2d< T, A >::address ( uint32_t x,
uint32_t y )
inline

◆ alignedBufferWidth()

template<typename T, template< typename TT > typename A>
uint32_t grk::Buffer2d< T, A >::alignedBufferWidth ( uint32_t width)
inline

◆ alloc2d() [1/2]

template<typename T, template< typename TT > typename A>
bool grk::Buffer2d< T, A >::alloc2d ( bool clear)
inline

◆ alloc2d() [2/2]

template<typename T, template< typename TT > typename A>
bool grk::Buffer2d< T, A >::alloc2d ( uint32_t w,
uint32_t str,
uint32_t h,
bool clear )
inline

◆ attach() [1/5]

template<typename T, template< typename TT > typename A>
void grk::Buffer2d< T, A >::attach ( Buffer2d< T, A > & rhs)
inline

◆ attach() [2/5]

template<typename T, template< typename TT > typename A>
void grk::Buffer2d< T, A >::attach ( Buffer2d< T, A > & rhs,
uint32_t x,
uint32_t y )
inline

◆ attach() [3/5]

template<typename T, template< typename TT > typename A>
void grk::Buffer2d< T, A >::attach ( Buffer2d< T, A > * rhs)
inline

◆ attach() [4/5]

template<typename T, template< typename TT > typename A>
void grk::Buffer2d< T, A >::attach ( Buffer2d< T, A > * rhs,
uint32_t x,
uint32_t y )
inline

◆ attach() [5/5]

template<typename T, template< typename TT > typename A>
void grk::Buffer2d< T, A >::attach ( T * buffer,
uint32_t strd )
inline

◆ clear()

template<typename T, template< typename TT > typename A>
void grk::Buffer2d< T, A >::clear ( void )
inline

◆ copyFrom() [1/3]

template<typename T, template< typename TT > typename A>
void grk::Buffer2d< T, A >::copyFrom ( const Buffer2d< T, A > & src)
inline

◆ copyFrom() [2/3]

template<typename T, template< typename TT > typename A>
template<typename F>
void grk::Buffer2d< T, A >::copyFrom ( const Buffer2d< T, A > & src,
F filter )
inline

◆ copyFrom() [3/3]

template<typename T, template< typename TT > typename A>
template<typename F>
void grk::Buffer2d< T, A >::copyFrom ( const Buffer2d< T, A > * src,
F filter )
inline

◆ copyFromNarrow()

template<typename T, template< typename TT > typename A>
template<typename SrcT, template< class > class SrcA, typename F>
void grk::Buffer2d< T, A >::copyFromNarrow ( const Buffer2d< SrcT, SrcA > * src,
F filter )
inline

◆ dealloc()

template<typename T, template< typename TT > typename A>
void grk::Buffer2d< T, A >::dealloc ( )
inlineoverridevirtual

Reimplemented from grk::Buffer< T, A >.

◆ getBuffer()

template<typename T, template< typename TT > typename A>
T * grk::Buffer2d< T, A >::getBuffer ( void ) const
inline

◆ getStride()

template<typename T, template< typename TT > typename A>
uint32_t grk::Buffer2d< T, A >::getStride ( )
inline

◆ length()

template<typename T, template< typename TT > typename A>
size_t grk::Buffer2d< T, A >::length ( void )
inline

◆ operator=() [1/2]

template<typename T, template< typename TT > typename A>
Buffer2d & grk::Buffer2d< T, A >::operator= ( const Buffer2d< T, A > & rhs)
inline

◆ operator=() [2/2]

template<typename T, template< typename TT > typename A>
Buffer2d & grk::Buffer2d< T, A >::operator= ( const Buffer2d< T, A > * rhs)
inline

◆ simple()

◆ simpleF()

◆ transfer()

template<typename T, template< typename TT > typename A>
void grk::Buffer2d< T, A >::transfer ( T ** buffer,
uint32_t * strd )
inline

Member Data Documentation

◆ stride

template<typename T, template< typename TT > typename A>
uint32_t grk::Buffer2d< T, A >::stride
protected

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