TachyonUI 1.1.0
High-performance UI for building tools.
Loading...
Searching...
No Matches
tachyon::ImageDisplay Struct Reference

How an image is shown, in this order: More...

#include <gui_core/graphics/gui_image.h>

Public Member Functions

uint32_t PackedFlags () const
 The channels and the sRGB flag as the shader reads them: 3 bits a channel (red first), bit 12 sRGB-encode, bit 31 set when any of it differs from the default.
bool operator== (const ImageDisplay &) const =default

Static Public Member Functions

static ImageDisplay Channel (ImageChannel channel)
 One channel shown as grey, opaque: a mask, a roughness map, an image's alpha.

Public Attributes

color4f tint { 1.0f, 1.0f, 1.0f, 1.0f }
ImageChannel red = ImageChannel::Red
ImageChannel green = ImageChannel::Green
ImageChannel blue = ImageChannel::Blue
ImageChannel alpha = ImageChannel::Alpha
bool srgbEncode = false

Detailed Description

How an image is shown, in this order:

  1. each channel shown taken from one of the image's channels, or a constant
  2. the color sRGB-encoded, for an image that holds linear values
  3. multiplied by tint

The default shows the image as it is.

Member Function Documentation

◆ Channel()

ImageDisplay tachyon::ImageDisplay::Channel ( ImageChannel channel)
inlinestatic

One channel shown as grey, opaque: a mask, a roughness map, an image's alpha.

◆ PackedFlags()

uint32_t tachyon::ImageDisplay::PackedFlags ( ) const
inline

The channels and the sRGB flag as the shader reads them: 3 bits a channel (red first), bit 12 sRGB-encode, bit 31 set when any of it differs from the default.

◆ operator==()

bool tachyon::ImageDisplay::operator== ( const ImageDisplay & ) const
default

Member Data Documentation

◆ tint

color4f tachyon::ImageDisplay::tint { 1.0f, 1.0f, 1.0f, 1.0f }

◆ red

ImageChannel tachyon::ImageDisplay::red = ImageChannel::Red

◆ green

ImageChannel tachyon::ImageDisplay::green = ImageChannel::Green

◆ blue

ImageChannel tachyon::ImageDisplay::blue = ImageChannel::Blue

◆ alpha

ImageChannel tachyon::ImageDisplay::alpha = ImageChannel::Alpha

◆ srgbEncode

bool tachyon::ImageDisplay::srgbEncode = false

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