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

A PainterStrokeShader holds shaders for stroking. It is to hold shaders for stroking paths linearly or via arcs with and without anti-aliasing along with meta-data to inform what shading is faster. More...

#include <painter_stroke_shader.hpp>

Public Types

enum  shader_type_t { non_aa_shader, aa_shader, number_shader_types }
 

Public Member Functions

 PainterStrokeShader (void)
 
 PainterStrokeShader (const PainterStrokeShader &obj)
 
enum PainterEnums::stroking_method_t fastest_anti_aliased_stroking_method (void) const
 
PainterStrokeShaderfastest_anti_aliased_stroking_method (enum PainterEnums::stroking_method_t v)
 
enum PainterEnums::stroking_method_t fastest_non_anti_aliased_stroking_method (void) const
 
PainterStrokeShaderfastest_non_anti_aliased_stroking_method (enum PainterEnums::stroking_method_t v)
 
PainterStrokeShaderoperator= (const PainterStrokeShader &rhs)
 
const reference_counted_ptr< PainterItemShader > & shader (enum PainterEnums::stroking_method_t tp, enum shader_type_t sh) const
 
PainterStrokeShadershader (enum PainterEnums::stroking_method_t tp, enum shader_type_t sh, const reference_counted_ptr< PainterItemShader > &v)
 
const reference_counted_ptr< const StrokingDataSelectorBase > & stroking_data_selector (void) const
 
PainterStrokeShaderstroking_data_selector (const reference_counted_ptr< const StrokingDataSelectorBase > &sh)
 
void swap (PainterStrokeShader &obj)
 

Detailed Description

A PainterStrokeShader holds shaders for stroking. It is to hold shaders for stroking paths linearly or via arcs with and without anti-aliasing along with meta-data to inform what shading is faster.

Definition at line 113 of file painter_stroke_shader.hpp.

Member Enumeration Documentation

◆ shader_type_t

Enumeration to specify what shader

Enumerator
non_aa_shader 

Specify the shader for rendering a stroked path without anti-aliasing. The depth value emitted in the item's vertex shader should be z-value to guarantee that there is no overdraw, see StrokedPoint::depth() and ArcStrokedPoint::depth().

aa_shader 

Specifies a two-pass shader where the first pass renders to the deferred coverage buffer (via PainterItemShader::coverage_shader()) and the second pass reads from it. The depth value emitted in the item's vertex shader should be z-value to guarantee that there is no overdraw, see StrokedPoint::depth() and ArcStrokedPoint::depth().

Definition at line 119 of file painter_stroke_shader.hpp.

Constructor & Destructor Documentation

◆ PainterStrokeShader() [1/2]

fastuidraw::PainterStrokeShader::PainterStrokeShader ( void  )

Ctor

◆ PainterStrokeShader() [2/2]

fastuidraw::PainterStrokeShader::PainterStrokeShader ( const PainterStrokeShader obj)

Copy ctor.

Member Function Documentation

◆ fastest_anti_aliased_stroking_method() [1/2]

enum PainterEnums::stroking_method_t fastuidraw::PainterStrokeShader::fastest_anti_aliased_stroking_method ( void  ) const

Return what PainterEnums::stroking_method_t is fastest to stroke with anti-aliasing.

◆ fastest_anti_aliased_stroking_method() [2/2]

PainterStrokeShader& fastuidraw::PainterStrokeShader::fastest_anti_aliased_stroking_method ( enum PainterEnums::stroking_method_t  v)

Set the value returned by fastest_anti_aliased_stroking_method(void) const.

Parameters
vvalue to use

◆ fastest_non_anti_aliased_stroking_method() [1/2]

enum PainterEnums::stroking_method_t fastuidraw::PainterStrokeShader::fastest_non_anti_aliased_stroking_method ( void  ) const

Return the fastest stroking method to use when stroking without anti-aliasing.

◆ fastest_non_anti_aliased_stroking_method() [2/2]

PainterStrokeShader& fastuidraw::PainterStrokeShader::fastest_non_anti_aliased_stroking_method ( enum PainterEnums::stroking_method_t  v)

Set the value returned by fastest_non_anti_aliased_stroking_method(void) const.

Parameters
vvalue to use

◆ operator=()

PainterStrokeShader& fastuidraw::PainterStrokeShader::operator= ( const PainterStrokeShader rhs)

Assignment operator.

◆ shader() [1/2]

const reference_counted_ptr<PainterItemShader>& fastuidraw::PainterStrokeShader::shader ( enum PainterEnums::stroking_method_t  tp,
enum shader_type_t  sh 
) const

Returns the PainterItemShader for a given pass of a given type of stroking.

Parameters
tpspecify to return a shader for arc or linear stroking
shspcify which shader to return

◆ shader() [2/2]

PainterStrokeShader& fastuidraw::PainterStrokeShader::shader ( enum PainterEnums::stroking_method_t  tp,
enum shader_type_t  sh,
const reference_counted_ptr< PainterItemShader > &  v 
)

Set the value returned by shader(enum PainterEnums::stroking_method_t, enum shader_type_t) const.

Parameters
tpspecify to return shader for arc or linear stroking
shspcify which shader to return
vvalue to use

◆ stroking_data_selector() [1/2]

const reference_counted_ptr<const StrokingDataSelectorBase>& fastuidraw::PainterStrokeShader::stroking_data_selector ( void  ) const

Returns the StrokingDataSelectorBase associated to this PainterStrokeShader.

◆ stroking_data_selector() [2/2]

PainterStrokeShader& fastuidraw::PainterStrokeShader::stroking_data_selector ( const reference_counted_ptr< const StrokingDataSelectorBase > &  sh)

Set the value returned by stroking_data_selector(void) const.

Parameters
shvalue to use

◆ swap()

void fastuidraw::PainterStrokeShader::swap ( PainterStrokeShader obj)

Swap operation

Parameters
objobject with which to swap

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