20 #ifndef FASTUIDRAW_PAINTER_HPP 21 #define FASTUIDRAW_PAINTER_HPP 167 float max_singular_value,
168 float min_singular_value)
const = 0;
190 vec2 viewport_size)
const = 0;
335 const float3x3 &initial_transformation,
336 bool clear_color_buffer =
true);
355 bool clear_color_buffer =
true);
463 shear(
float sx,
float sy);
669 attrib_chunks, index_chunks, index_adjusts,
686 int index_adjust = 0)
830 float additional_pixel_slack = 0.0f,
831 float additional_item_slack = 0.0f);
847 float additional_pixel_slack = 0.0f);
997 unsigned int begin,
unsigned int count,
1014 unsigned int begin,
unsigned int count,
1034 unsigned int begin,
unsigned int count,
1102 unsigned int begin,
unsigned int count,
1118 unsigned int begin,
unsigned int count,
1135 unsigned int begin,
unsigned int count,
1210 float *out_rounded_thresh);
1243 bool select_miter_joins,
1260 bool apply_shader_anti_aliasing =
true,
1276 bool apply_shader_anti_aliasing =
true,
1299 bool apply_shader_anti_aliasing =
true,
1304 stroke_style, apply_shader_anti_aliasing,
1305 stroking_method, effect);
1321 bool apply_shader_anti_aliasing =
true,
1337 bool apply_shader_anti_aliasing =
true,
1360 bool apply_shader_anti_aliasing =
true,
1365 stroke_style, apply_shader_anti_aliasing,
1366 stroking_method, effect);
1380 bool apply_shader_anti_aliasing =
true);
1393 bool apply_shader_anti_aliasing =
true);
1406 bool apply_shader_anti_aliasing =
true);
1419 bool apply_shader_anti_aliasing =
true);
1441 bool apply_shader_anti_aliasing =
true);
1452 bool apply_shader_anti_aliasing =
true);
1478 bool apply_shader_anti_aliasing =
true)
1495 bool apply_shader_anti_aliasing =
true)
1511 bool apply_shader_anti_aliasing =
true);
1522 bool apply_shader_anti_aliasing =
true);
1536 bool apply_shader_anti_aliasing =
true)
1551 bool apply_shader_anti_aliasing =
true);
1561 bool apply_shader_anti_aliasing =
true);
1574 bool apply_shader_anti_aliasing =
true)
1589 bool apply_shader_anti_aliasing =
true);
1599 bool apply_shader_anti_aliasing =
true);
1612 bool apply_shader_anti_aliasing =
true)
1630 int index_adjust = 0)
1691 int index_adjust = 0);
static unsigned int number_stats(void)
A GlyphSequence represents a sequence of glyph codes with positions. A GlyphSequence provides an inte...
void stroke_path(const PainterBrush &brush, const PainterStrokeParams &stroking_params, const Path &path, const StrokingStyle &stroke_style=StrokingStyle(), bool apply_shader_anti_aliasing=true, enum stroking_method_t stroking_method=stroking_method_fastest, const PathEffect *effect=nullptr)
A PainterPackedValuePool can be used to create PainterPackedValue objects.
void fill_rounded_rect(const PainterFillShader &shader, const PainterData &draw, const RoundedRect &R, bool apply_shader_anti_aliasing=true)
A GlyphAtlas is a common location to place glyph data of an application. Ideally, all glyph data is p...
A PainterBlendShader represents a shader for performing blending operations.
void begin_coverage_buffer(void)
GlyphRenderer draw_glyphs(const PainterBrush &brush, const GlyphRun &glyph_run, const GlyphRendererChooser &renderer_chooser)
A PainterDashedStrokeShaderSet holds a collection of PainterStrokeShaderSet objects for the purpose o...
virtual GlyphRenderer choose_glyph_render(float logical_format_size, const float3x3 &transformation, vec2 viewport_size, float max_singular_value, float min_singular_value) const =0
PainterPackedValuePool & packed_value_pool(void)
void stroke_dashed_path(const PainterBrush &brush, const PainterDashedStrokeParams &stroking_params, const Path &path, const StrokingStyle &stroke_style=StrokingStyle(), bool apply_shader_anti_aliasing=true, enum stroking_method_t stroking_method=stroking_method_fastest, const PathEffect *effect=nullptr)
A PainterData provides the data for how for a Painter to draw content.
screen_orientation
Enumeration to indicate in what direction the y-coordinate increases.
void begin(const reference_counted_ptr< PainterSurface > &surface, const float3x3 &initial_transformation, bool clear_color_buffer=true)
void begin_layer(float alpha)
all classes and functions of FastUIDraw are in the namespace fastuidraw.
void fill_path(const PainterBrush &brush, const Path &path, const CustomFillRuleBase &fill_rule, bool apply_shader_anti_aliasing=true)
void queue_action(const reference_counted_ptr< const PainterDrawBreakAction > &action)
A PainterFillShader holds the shaders for drawing filled paths. Anti-aliasing is accomplished by draw...
query_stats_t
Enumeration to query the statistics of how much data has been packed.
void fill_path(const PainterFillShader &shader, const PainterData &draw, const FilledPath &data, enum fill_rule_t fill_rule, bool apply_shader_anti_aliasing=true)
blend_mode_t
Enumeration specifying blend modes. The following function-formulas are used in a number of the blend...
bool clip_region_bounds(vec2 *min_pt, vec2 *max_pt)
A wrapper over a pointer to implement reference counting.
GlyphRenderer draw_glyphs(const PainterBrush &brush, const GlyphRun &glyph_run, unsigned int begin, unsigned int count, GlyphRenderer renderer=GlyphRenderer(banded_rays_glyph))
void clip_in_rect(const Rect &rect)
return_code
Enumeration for simple return codes for functions for success or failure.
const GlyphRendererChooser & default_glyph_renderer_chooser(void) const
const reference_counted_ptr< PainterBlendShader > & shader(enum PainterEnums::blend_mode_t tp) const
A GlyphCache represents a cache of glyphs and manages the uploading of the data to a GlyphAtlas...
A PainterStrokeShader holds shaders for stroking. It is to hold shaders for stroking paths linearly o...
PainterBlendShader * blend_shader(void) const
A PainterBlendShaderSet represents a set of shaders for the blend modes enumerated by PainterEnums::b...
A ShaderFilledPath represents a path that is drawn as a rectangle where the fragment shader acting on...
ImageAtlas & image_atlas(void) const
GlyphRenderer draw_glyphs(const PainterGlyphShader &shader, const PainterData &draw, const GlyphSequence &glyph_sequence, GlyphRenderer renderer=GlyphRenderer(banded_rays_glyph))
void fill_convex_polygon(const PainterBrush &brush, c_array< const vec2 > pts, bool apply_shader_anti_aliasing=true)
void query_stats(c_array< unsigned int > dst) const
void fill_rect(const PainterFillShader &shader, const PainterData &draw, const Rect &rect, bool apply_shader_anti_aliasing=true)
A GlyphRun represents a sequence of glyph codes with positions. A GlyphRun provides an interface to g...
enum return_code flush(void)
void clip_out_convex_polygon(c_array< const vec2 > poly)
void fill_rect(const PainterBrush &brush, const Rect &rect, bool apply_shader_anti_aliasing=true)
unsigned int query_stat(enum query_stats_t st) const
Class to encapsulate enumerations used in Painter interface, part of the main library libFastUIDraw...
void clip_out_path(const Path &path, enum fill_rule_t fill_rule)
c_array< const PainterSurface *const > end(void)
GlyphRenderer draw_glyphs(const PainterBrush &brush, const GlyphSequence &glyph_sequence, GlyphRenderer renderer=GlyphRenderer(banded_rays_glyph))
BlendMode blend_mode(void) const
void blend_shader(const PainterBlendShaderSet &shader_set, enum blend_mode_t m)
const float3x3 & transformation(void)
void translate(const vec2 &p)
Provides an interface to write attribute and index data when a simple copy of data from c_array objec...
A ColorStopAtlas is a common location to all color stop data of an application. Ideally, all color stop sequences are placed into a single ColorStopAtlas (changes of ColorStopAtlas force draw-call breaks).
Painter implements a canvas rendering interface.
ColorStopAtlas & colorstop_atlas(void) const
void concat(const float3x3 &tr)
GlyphRenderer draw_glyphs(const PainterBrush &brush, const GlyphSequence &glyph_sequence, const GlyphRendererChooser &renderer_chooser)
float compute_path_thresh(const Path &path)
const reference_counted_ptr< PainterSurface > & surface(void) const
file painter_attribute_data.hpp
A FilledPath represents the data needed to draw a path filled. It contains -all- the data needed to f...
A PainterShaderRegistrar is an interface that defines the assigning of PainterShader::ID() to a Paint...
void draw_generic(PainterItemShader *shader, const PainterData &draw, c_array< const PainterAttribute > attrib_chunk, c_array< const PainterIndex > index_chunk, int index_adjust=0)
Class to specify dashed stroking parameters, data is packed as according to PainterDashedStrokeParams...
GlyphRenderer draw_glyphs(const PainterBrush &brush, const GlyphRun &glyph_run, GlyphRenderer renderer=GlyphRenderer(banded_rays_glyph))
void begin_layer(const reference_counted_ptr< const PainterEffect > &effect, PainterEffectParams &effect_params)
A PainterShaderSet provides shaders for blending and drawing each of the item types glyphs...
A c_array is a wrapper over a C pointer with a size parameter to facilitate bounds checking and provi...
void clip_out_custom(PainterItemShader *shader, const PainterDataValue< PainterItemShaderData > &shader_data, c_array< const PainterAttribute > attrib_chunk, c_array< const PainterIndex > index_chunk, int index_adjust=0)
A PathEffect allows one to process a sequence of TessellatedPath::segment_chain, TessellatedPath::joi...
void stroke_dashed_path(const PainterDashedStrokeShaderSet &shader, const PainterData &draw, const Path &path, const StrokingStyle &stroke_style=StrokingStyle(), bool apply_shader_anti_aliasing=true, enum stroking_method_t stroking_method=stroking_method_fastest, const PathEffect *effect=nullptr)
A PainterBrush defines a brush for painting via Painter.
Painter(const reference_counted_ptr< PainterEngine > &backend)
fill_rule_t
Enumerations specifying common fill rules.
file painter_packed_value_pool.hpp
Defines default reference counting base classes.
A GlyphRendererChooser provides an interface for choosing how to render glyphs depending on the curre...
GlyphRenderer compute_glyph_renderer(float pixel_size)
void clip_out_rect(const Rect &rect)
An ImageAtlas is a common location to place images of an application.
A PainterGlyphShader holds a shader for each glyph_type. The shaders are to handle attribute data as ...
void clip_out_rounded_rect(const RoundedRect &R)
A PartitionedTessellatedPath represents partitioning a TessellatedPath for quick computation of what ...
void fill_rounded_rect(const PainterBrush &brush, const RoundedRect &R, bool apply_shader_anti_aliasing=true)
file painter_shader_set.hpp
const PainterShaderSet & default_shaders(void) const
file painter_stroke_params.hpp
void clip_out_custom(PainterItemShader *shader, const PainterDataValue< PainterItemShaderData > &shader_data, c_array< const c_array< const PainterAttribute > > attrib_chunks, c_array< const c_array< const PainterIndex > > index_chunks, c_array< const int > index_adjusts)
A Path represents a collection of PathContour objects.
PainterShaderRegistrar & painter_shader_registrar(void) const
GlyphCache & glyph_cache(void) const
void blend_shader(enum blend_mode_t m)
void shear(float sx, float sy)
void clip_in_path(const Path &path, enum fill_rule_t fill_rule)
BlendMode blend_mode(enum PainterEnums::blend_mode_t tp) const
void clip_in_rounded_rect(const RoundedRect &R)
c_array< const vec3 > clip_equations(void)
Element of PainterData to hold shader data either reference directly to unpacked data or to reuseable...
file painter_attribute_writer.hpp
void clip_out_custom(PainterItemShader *shader, const PainterDataValue< PainterItemShaderData > &shader_data, c_array< const c_array< const PainterAttribute > > attrib_chunks, c_array< const c_array< const PainterIndex > > index_chunks, c_array< const int > index_adjusts, c_array< const unsigned int > attrib_chunk_selector)
Base class to specify a custom fill rule.
float curve_flatness(void)
GlyphAtlas & glyph_atlas(void) const
void fill_path(const PainterBrush &brush, const Path &path, enum fill_rule_t fill_rule, bool apply_shader_anti_aliasing=true)
Specifies how to render a glyph.
A PainterItemShader represents a shader to draw an item (typically a vertex and fragment shader pair)...
A NormalizedCoordRect is used to specify a rectangle in -normalized- device coordinates. Recall that normalized device coordinates hae that the bottom-left is (-1, 1) and the top right is (+1, +1) ALWAYS.
Class to specify stroking parameters, data is packed as according to PainterStrokeParams::stroke_data...
file painter_dashed_stroke_params.hpp
Class to hold the blend mode as exposed by typical 3D APIs.
void end_coverage_buffer(void)
void fill_convex_polygon(const PainterFillShader &shader, const PainterData &draw, c_array< const vec2 > pts, bool apply_shader_anti_aliasing=true)
unsigned int draw_data_added_count(void) const
void stroke_path(const PainterStrokeShader &shader, const PainterData &draw, const Path &path, const StrokingStyle &stroke_style=StrokingStyle(), bool apply_shader_anti_aliasing=true, enum stroking_method_t stroking_method=stroking_method_fastest, const PathEffect *effect=nullptr)
bool clip_region_logical_bounds(vec2 *min_pt, vec2 *max_pt)
c_array< const vec3 > clip_polygon(void)
GlyphRenderer draw_glyphs(const PainterBrush &brush, const GlyphRun &glyph_run, unsigned int begin, unsigned int count, const GlyphRendererChooser &renderer_chooser)
unsigned int select_subsets(const FilledPath &path, c_array< unsigned int > dst)
file reference_counted.hpp