HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Data Fields
tt::pipeline_image::Image Struct Reference

#include <ttauri/GUI/pipeline_image_image.hpp>

Public Types

enum class  State { Uninitialized , Drawing , Uploaded }
 

Public Member Functions

 Image (device_shared *parent, size_t width_in_px, size_t height_in_px, size_t width_in_pages, size_t height_in_pages, std::vector< Page > &&pages) noexcept
 
 Image (Image &&other) noexcept
 
Imageoperator= (Image &&other) noexcept
 
 Image (Image const &other)=delete
 
Imageoperator= (Image const &other)=delete
 
aarectangle index_to_rect (size_t page_index) const noexcept
 Find the image coordinates of a page in the image.
 
void place_vertices (vspan< vertex > &vertices, aarectangle clipping_rectangle, matrix3 transform)
 
void upload (pixel_map< sfloat_rgba16 > const &image) noexcept
 Upload image to atlas.
 

Data Fields

std::atomic< State > state = State::Uninitialized
 
device_sharedparent
 
size_t width_in_px
 The width of the image in pixels.
 
size_t height_in_px
 The height of the image in pixels.
 
size_t width_in_pages
 The width of the image in pages.
 
size_t height_in_pages
 The height of the image in pages.
 
std::vector< Pagepages
 

Detailed Description

This is a image that is uploaded into the texture atlas.

Member Function Documentation

◆ index_to_rect()

aarectangle tt::pipeline_image::Image::index_to_rect ( size_t page_index) const
noexcept

Find the image coordinates of a page in the image.

Parameters
pageIndexIndex in the pages-vector.
Returns
The rectangle within the image representing a quad to be drawn. This rectangle is already size-adjusted for the quads on the edge.

◆ place_vertices()

void tt::pipeline_image::Image::place_vertices ( vspan< vertex > & vertices,
aarectangle clipping_rectangle,
matrix3 transform )

Place vertices for this image. An image is build out of atlas pages, that need to be individual rendered. A page with the value std::numeric_limits<uint16_t>::max() is not rendered.

◆ upload()

void tt::pipeline_image::Image::upload ( pixel_map< sfloat_rgba16 > const & image)
noexcept

Upload image to atlas.

Field Documentation

◆ height_in_pages

size_t tt::pipeline_image::Image::height_in_pages

The height of the image in pages.

◆ height_in_px

size_t tt::pipeline_image::Image::height_in_px

The height of the image in pixels.

◆ width_in_pages

size_t tt::pipeline_image::Image::width_in_pages

The width of the image in pages.

◆ width_in_px

size_t tt::pipeline_image::Image::width_in_px

The width of the image in pixels.


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