nngn
anonymous_namespace{terminal.cpp}::FrameBuffer Class Reference
Collaboration diagram for anonymous_namespace{terminal.cpp}::FrameBuffer:

Classes

struct  ColoredPixel
 

Public Member Functions

 FrameBuffer (Mode m)
 
std::span< char > span ()
 Pointer to the content. More...
 
void resize_and_clear (nngn::uvec2 s)
 Changes the size and clears the content according to the mode. More...
 
void write (std::size_t x, std::size_t y, Texture::texel4 color)
 Write pixel at {x, y} with color. More...
 
void flip ()
 Inverts the Y coord. More...
 
std::size_t dedup ()
 Eliminates redundant information, possibly reducing the size. More...
 

Private Types

using write_f = void(FrameBuffer::*)(std::size_t, std::size_t, Texture::texel4)
 

Private Member Functions

std::size_t pixel_size () const
 
std::size_t size_bytes () const
 
void write_ascii (std::size_t x, std::size_t y, Texture::texel4 color)
 
void write_colored (std::size_t x, std::size_t y, Texture::texel4 color)
 

Private Attributes

Mode mode
 
write_f wf
 
std::vector< char > v = {}
 
nngn::uvec2 size = {}
 

Member Typedef Documentation

◆ write_f

using anonymous_namespace{terminal.cpp}::FrameBuffer::write_f = void (FrameBuffer::*)( std::size_t, std::size_t, Texture::texel4)
private

Constructor & Destructor Documentation

◆ FrameBuffer()

anonymous_namespace{terminal.cpp}::FrameBuffer::FrameBuffer ( Mode  m)
explicit

Member Function Documentation

◆ dedup()

std::size_t anonymous_namespace{terminal.cpp}::FrameBuffer::dedup ( )

Eliminates redundant information, possibly reducing the size.

Unique elements will be in span(0, dedup()).

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

◆ flip()

void anonymous_namespace{terminal.cpp}::FrameBuffer::flip ( )

Inverts the Y coord.

of all pixels, must be called before dedup.

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

◆ pixel_size()

std::size_t anonymous_namespace{terminal.cpp}::FrameBuffer::pixel_size ( ) const
private
Here is the caller graph for this function:

◆ resize_and_clear()

void anonymous_namespace{terminal.cpp}::FrameBuffer::resize_and_clear ( nngn::uvec2  s)

Changes the size and clears the content according to the mode.

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

◆ size_bytes()

std::size_t anonymous_namespace{terminal.cpp}::FrameBuffer::size_bytes ( ) const
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ span()

std::span<char> anonymous_namespace{terminal.cpp}::FrameBuffer::span ( )
inline

Pointer to the content.

Here is the caller graph for this function:

◆ write()

void anonymous_namespace{terminal.cpp}::FrameBuffer::write ( std::size_t  x,
std::size_t  y,
Texture::texel4  color 
)
inline

Write pixel at {x, y} with color.

Here is the caller graph for this function:

◆ write_ascii()

void anonymous_namespace{terminal.cpp}::FrameBuffer::write_ascii ( std::size_t  x,
std::size_t  y,
Texture::texel4  color 
)
private
Here is the call graph for this function:

◆ write_colored()

void anonymous_namespace{terminal.cpp}::FrameBuffer::write_colored ( std::size_t  x,
std::size_t  y,
Texture::texel4  color 
)
private
Here is the call graph for this function:

Member Data Documentation

◆ mode

Mode anonymous_namespace{terminal.cpp}::FrameBuffer::mode
private

◆ size

nngn::uvec2 anonymous_namespace{terminal.cpp}::FrameBuffer::size = {}
private

◆ v

std::vector<char> anonymous_namespace{terminal.cpp}::FrameBuffer::v = {}
private

◆ wf

write_f anonymous_namespace{terminal.cpp}::FrameBuffer::wf
private

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