FastUIDraw
Public Member Functions | List of all members
fastuidraw::StrokingDataSelectorBase Class Referenceabstract

A StrokingDataSelector is an interface to assist Painter to select correct LOD for rounded joins and caps when drawing rounded joins and caps. In addition it also informs Painter if stroking via arcs is possible with the stroking parameters. More...

#include <painter_stroke_shader.hpp>

Inheritance diagram for fastuidraw::StrokingDataSelectorBase:
Inheritance graph
[legend]

Public Member Functions

virtual bool arc_stroking_possible (c_array< const uvec4 > data) const =0
 
virtual float compute_thresh (c_array< const uvec4 > data, float path_magnification, float curve_flatness) const =0
 
virtual bool data_compatible (c_array< const uvec4 > data) const =0
 
virtual void stroking_distances (c_array< const uvec4 > data, c_array< float > out_values) const =0
 
- Public Member Functions inherited from fastuidraw::reference_counted_base< T, Counter >
 reference_counted_base (void)
 

Additional Inherited Members

- Public Types inherited from fastuidraw::PathEnums
enum  edge_type_t { starts_new_edge, continues_edge }
 
enum  path_geometry_inflation_index_t {
  pixel_space_distance = 0, item_space_distance, pixel_space_distance_miter_joins, item_space_distance_miter_joins,
  path_geometry_inflation_index_count
}
 
- Static Public Member Functions inherited from fastuidraw::reference_counted_base< T, Counter >
static void add_reference (const reference_counted_base< T, Counter > *p)
 
static void remove_reference (const reference_counted_base< T, Counter > *p)
 

Detailed Description

A StrokingDataSelector is an interface to assist Painter to select correct LOD for rounded joins and caps when drawing rounded joins and caps. In addition it also informs Painter if stroking via arcs is possible with the stroking parameters.

Definition at line 48 of file painter_stroke_shader.hpp.

Member Function Documentation

◆ arc_stroking_possible()

virtual bool fastuidraw::StrokingDataSelectorBase::arc_stroking_possible ( c_array< const uvec4 data) const
pure virtual

To be implemented by a derived class to specify if arc-stroking is possible with the stroking parameters.

Parameters
datapacked data to be sent to the shader

◆ compute_thresh()

virtual float fastuidraw::StrokingDataSelectorBase::compute_thresh ( c_array< const uvec4 data,
float  path_magnification,
float  curve_flatness 
) const
pure virtual

To be implemented by a derived class to compute the value used to select rounded join level of detail (StrokedPath::rounded_joins()) and rounded cap level of detail (StrokedPath::rounded_caps()).

Parameters
datapacked data to be sent to the shader
path_magnificationby how much the path is magnified from its native coordiantes to pixel coordinates.
curve_flatnesscurve flatness

◆ data_compatible()

virtual bool fastuidraw::StrokingDataSelectorBase::data_compatible ( c_array< const uvec4 data) const
pure virtual

To be implemented by a derived class to specify if the passed data is suitable for it.

Parameters
datapacked data to be sent to the shader

◆ stroking_distances()

virtual void fastuidraw::StrokingDataSelectorBase::stroking_distances ( c_array< const uvec4 data,
c_array< float >  out_values 
) const
pure virtual

To be implemented by a derived class to give by how much the stroking gives thickness to the stroked path. These values are geometrically added together. The intersection test performed is to first inflate the bounding boxes in local coordinates by the output out_item_space_distance, then to convert the box to clip-coordinates and then push each clip-equation by *out_pixel_space_distance

Parameters
datapacked data to be sent to the shader
[out]out_valuesoutput with array indexed as according to path_geometry_inflation_index_t

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