nxt/raster.hpp file

Namespaces

namespace nxt

Classes

struct nxt::Rgb8
Opaque 24-bit RGB color.
struct nxt::Rgba8
struct nxt::IndexedCell
A cell with its column position for iteration.
struct nxt::Cell
Cell data for inspection.
class nxt::RasterView
class nxt::Raster

Typedefs

using color_view_t = std::experimental::mdspan<Rgba8, mdspan_extents, std::experimental::layout_stride>
Mutable 2D color view.
using const_color_view_t = std::experimental::mdspan<const Rgba8, mdspan_extents, std::experimental::layout_stride>
Const 2D color view.
using const_emphasis_view_t = std::experimental::mdspan<const Emphasis, mdspan_extents, std::experimental::layout_stride>
Const 2D emphasis view.
using const_glyph_view_t = std::experimental::mdspan<const GlyphTable::GlyphId, mdspan_extents, std::experimental::layout_stride>
Const 2D glyph view.
using emphasis_view_t = std::experimental::mdspan<Emphasis, mdspan_extents, std::experimental::layout_stride>
Mutable 2D emphasis view.
using glyph_view_t = std::experimental::mdspan<GlyphTable::GlyphId, mdspan_extents, std::experimental::layout_stride>
Mutable 2D glyph view.
using mdspan_extents = std::experimental::extents<std::size_t, std::dynamic_extent, std::dynamic_extent>
Dynamic extents for terminal-cell rasters.

Functions

template <typename T, typename Extents, typename Layout, typename Accessor>
auto as_range(std::experimental::mdspan<T, Extents, Layout, Accessor> m) →  auto
auto has_emphasis(Emphasis set, Emphasis flag) →  bool constexpr noexcept
auto indexed_cell_row(const_glyph_view_t glyphs, const_color_view_t fgs, const_color_view_t bgs, const_emphasis_view_t ems, std::size_t row_idx) →  auto
Get a row as indexed cells (col, glyph, fg, bg, em).
template <typename T, typename Extents, typename Layout, typename Accessor>
auto indexed_row(std::experimental::mdspan<T, Extents, Layout, Accessor> m, std::size_t row_idx) →  auto
auto operator&(Emphasis a, Emphasis b) →  Emphasis constexpr noexcept
auto operator|(Emphasis a, Emphasis b) →  Emphasis constexpr noexcept
auto operator|=(Emphasis& a, Emphasis b) →  Emphasis& constexpr noexcept
template <typename T, typename Extents, typename Layout, typename Accessor>
auto row_range(std::experimental::mdspan<T, Extents, Layout, Accessor> m, std::size_t row_idx) →  auto
Get a single row from a 2D mdspan as a range.
auto zip_rows(const Raster& front, const Raster& back) →  auto

Variables

Emphasis DEFAULT_EMPHASIS constexpr
Default emphasis (none)