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

The part of an image to draw, in UV: 0,0 is its top-left corner and 1,1 its bottom-right. More...

#include <gui_core/graphics/gui_image.h>

Public Member Functions

bool operator== (const UVRect &) const =default

Static Public Member Functions

static UVRect FromPixels (IntRect pixels, uint2 imageSize)
 The part of an image imageSize pixels big covered by pixels, as for a cell of an atlas.

Public Attributes

float2 min { 0.0f, 0.0f }
float2 max { 1.0f, 1.0f }

Detailed Description

The part of an image to draw, in UV: 0,0 is its top-left corner and 1,1 its bottom-right.

The default is the whole image; a min past max flips it.

Member Function Documentation

◆ FromPixels()

UVRect tachyon::UVRect::FromPixels ( IntRect pixels,
uint2 imageSize )
inlinestatic

The part of an image imageSize pixels big covered by pixels, as for a cell of an atlas.

◆ operator==()

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

Member Data Documentation

◆ min

float2 tachyon::UVRect::min { 0.0f, 0.0f }

◆ max

float2 tachyon::UVRect::max { 1.0f, 1.0f }

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