20 #ifndef FASTUIDRAW_PAINTER_GRADIENT_BRUSH_SHADER_DATA_HPP 21 #define FASTUIDRAW_PAINTER_GRADIENT_BRUSH_SHADER_DATA_HPP 198 return m_data.m_type;
221 const vec2 &start_p,
const vec2 &end_p)
224 m_data.m_grad_start = start_p;
225 m_data.m_grad_end = end_p;
241 const vec2 &start_p,
float start_r,
242 const vec2 &end_p,
float end_r)
245 m_data.m_grad_start = start_p;
246 m_data.m_grad_start_r = start_r;
247 m_data.m_grad_end = end_p;
248 m_data.m_grad_end_r = end_r;
266 const vec2 &p,
float r)
284 const vec2 &p,
float theta,
float F = 1.0f)
287 m_data.m_grad_start = p;
288 m_data.m_grad_end =
vec2(theta, F);
309 const vec2 &p,
float theta,
318 S = (b1 == b2) ? 1.0f : -1.0f;
340 const vec2 &p,
float theta,
344 return sweep_gradient(cs, p, theta, orientation, rotation_orientation, 1.0f);
370 m_grad_start(0.0f, 0.0f),
371 m_grad_end(1.0f, 1.0f),
372 m_grad_start_r(0.0f),
378 vec2 m_grad_start, m_grad_end;
379 float m_grad_start_r, m_grad_end_r;
PainterGradientBrushShaderData & reset(void)
gradient_offset_t
Enumeration that provides offset, in units of uint32_t, of the packing of the gradient data...
color_stop_xy_encoding
Bit encoding for packing ColorStopSequence::texel_location()
A PainterGradientBrushShaderData defines the PainterBrushShaderData that the shaders of a PainterGrad...
screen_orientation
Enumeration to indicate in what direction the y-coordinate increases.
all classes and functions of FastUIDraw are in the namespace fastuidraw.
A wrapper over a pointer to implement reference counting.
PainterGradientBrushShaderData & sweep_gradient(const reference_counted_ptr< const ColorStopSequence > &cs, const vec2 &p, float theta, float F=1.0f)
enum gradient_type_t type(void) const
const reference_counted_ptr< const ColorStopSequence > & color_stops(void) const
c_array< const reference_counted_ptr< const Image > > bind_images(void) const override
file painter_brush_shader_data.hpp
void save_resources(c_array< reference_counted_ptr< const resource_base > > dst) const override
PainterGradientBrushShaderData & radial_gradient(const reference_counted_ptr< const ColorStopSequence > &cs, const vec2 &start_p, float start_r, const vec2 &end_p, float end_r)
Base class to hold custom data for custom brush shaders.
unsigned int number_resources(void) const override
A c_array is a wrapper over a C pointer with a size parameter to facilitate bounds checking and provi...
rotation_orientation_t
Enumeration to specify orientation of a rotation.
PainterGradientBrushShaderData & sweep_gradient(const reference_counted_ptr< const ColorStopSequence > &cs, const vec2 &p, float theta, enum PainterEnums::screen_orientation orientation, enum PainterEnums::rotation_orientation_t rotation_orientation)
PainterGradientBrushShaderData & sweep_gradient(const reference_counted_ptr< const ColorStopSequence > &cs, const vec2 &p, float theta, enum PainterEnums::screen_orientation orientation, enum PainterEnums::rotation_orientation_t rotation_orientation, float F)
unsigned int data_size(void) const override
void pack_data(c_array< uvec4 > dst) const override
PainterGradientBrushShaderData(const PainterGradientBrushShaderData &obj)
Class to contain various enumerations needed for describing a brush.
PainterGradientBrushShaderData(void)
PainterGradientBrushShaderData & linear_gradient(const reference_counted_ptr< const ColorStopSequence > &cs, const vec2 &start_p, const vec2 &end_p)
PainterGradientBrushShaderData & radial_gradient(const reference_counted_ptr< const ColorStopSequence > &cs, const vec2 &p, float r)
PainterGradientBrushShaderData & operator=(const PainterGradientBrushShaderData &obj)