FastUIDraw
Public Types | Public Member Functions | Public Attributes | List of all members
fastuidraw::PainterBrushAdjust Class Reference

A PainterBrushAdjust holds the value for applying a tranformation to the brush position before it is handed off to brush shading. The transformation is shearing composited with a translation, i.e. the transformation is given by. More...

#include <painter_brush_adjust.hpp>

Public Types

enum  data_offset_t {
  shear_x_offset, shear_y_offset, translation_x_offset, translation_y_offset,
  raw_data_size
}
 Enumeration that provides offsets for the values in a PainterBrushAdjust in units of uint32_t. More...
 

Public Member Functions

 PainterBrushAdjust (void)
 
unsigned int data_size (void) const
 
void pack_data (c_array< uvec4 > dst) const
 

Public Attributes

vec2 m_shear
 
vec2 m_translate
 

Detailed Description

A PainterBrushAdjust holds the value for applying a tranformation to the brush position before it is handed off to brush shading. The transformation is shearing composited with a translation, i.e. the transformation is given by.

out_value = m_shear * in_value + m_translate

Definition at line 44 of file painter_brush_adjust.hpp.

Member Enumeration Documentation

◆ data_offset_t

Enumeration that provides offsets for the values in a PainterBrushAdjust in units of uint32_t.

Enumerator
shear_x_offset 

offset of m_shear.x() (packed as float)

shear_y_offset 

offset of m_shear.y() (packed as float)

translation_x_offset 

offset of m_translation.x() (packed as float)

translation_y_offset 

offset of m_translation.y() (packed as float)

raw_data_size 

size of the raw data before padding

Definition at line 52 of file painter_brush_adjust.hpp.

Constructor & Destructor Documentation

◆ PainterBrushAdjust()

fastuidraw::PainterBrushAdjust::PainterBrushAdjust ( void  )
inlineexplicit

Ctor, initializes the adjustment as identity

Definition at line 65 of file painter_brush_adjust.hpp.

Member Function Documentation

◆ data_size()

unsigned int fastuidraw::PainterBrushAdjust::data_size ( void  ) const
inline

Returns the length of the data needed to encode the data. Data is padded to be multiple of 4.

Definition at line 75 of file painter_brush_adjust.hpp.

◆ pack_data()

void fastuidraw::PainterBrushAdjust::pack_data ( c_array< uvec4 dst) const

Pack the values of this PainterItemMatrix

Parameters
dstplace to which to pack data

Member Data Documentation

◆ m_shear

vec2 fastuidraw::PainterBrushAdjust::m_shear

The shearing to apply to the brush before the translation.

Definition at line 91 of file painter_brush_adjust.hpp.

◆ m_translate

vec2 fastuidraw::PainterBrushAdjust::m_translate

The translation to apply to the brush after applying the shearing.

Definition at line 97 of file painter_brush_adjust.hpp.


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