21 #ifndef FASTUIDRAW_PATH_HPP 22 #define FASTUIDRAW_PATH_HPP 26 #include <fastuidraw/util/rect.hpp> 31 #include <fastuidraw/painter/shader_filled_path.hpp> 85 float *out_max_distance) = 0;
118 start_pt(
void)
const;
130 edge_type(
void)
const;
158 float *out_max_distance)
const = 0;
229 float *out_max_distance)
const;
267 distance_to_line_segment(
void)
const = 0;
280 distance_to_arc(
float arc_radius,
vec2 center,
281 vec2 unit_vector_arc_middle,
282 float cos_half_arc_angle)
const = 0;
302 float *out_max_distance)
const;
319 vec2 *out_p)
const = 0;
328 minimum_tessellation_recursion(
void)
const = 0;
418 minimum_tessellation_recursion(
void)
const;
485 float *out_max_distance)
const;
606 point(
unsigned int I)
const;
716 m_angle(angle), m_pt(pt)
851 operator<<(
const vec2 &pt);
867 operator<<(
const arc &a);
920 line_to(
const vec2 &pt,
932 quadratic_to(
const vec2 &ct,
const vec2 &pt,
945 cubic_to(
const vec2 &ct1,
const vec2 &ct2,
const vec2 &pt,
960 arc_to(
float angle,
const vec2 &pt,
968 move(
const vec2 &pt);
992 close_contour_arc(
float angle,
1001 close_contour_quadratic(
const vec2 &ct,
1011 close_contour_cubic(
const vec2 &ct1,
const vec2 &ct2,
1019 current_contour(
void);
1034 add_contours(
const Path &path);
1040 number_contours(
void)
const;
1047 contour(
unsigned int i)
const;
1076 tessellation(
float thresh)
const;
1086 tessellation(
void)
const;
1095 shader_filled_path(
void)
const;
An TessellatedPath represents the tessellation of a Path into line segments and arcs.
Class that wraps a vec2 to mark a point as a control point for a Bezier curve.
Indicates to end the existing contour with adding a closing edge of the contour and start a new conto...
reference_counted_ptr< PathContour > deep_copy(void) const
control_point(const vec2 &pt)
file fastuidraw_memory.hpp
Tag class to mark the end of a contour without adding a closing edge of the contour and start a new c...
arc(float angle, const vec2 &pt)
virtual void resume_tessellation(const TessellatedPath::TessellationParams &tess_params, TessellatedPath::SegmentStorage *out_data, float *out_max_distance)=0
contour_close_arc(float angle)
all classes and functions of FastUIDraw are in the namespace fastuidraw.
A TessellationParams stores how finely to tessellate the curves of a path.
static contour_close_arc contour_close_arc_degrees(float angle)
static arc arc_degrees(float angle, const vec2 &pt)
file tessellated_path.hpp
An arc is for connecting one point to the next via an arc of a circle.
A wrapper over a pointer to implement reference counting.
return_code
Enumeration for simple return codes for functions for success or failure.
Tag class to mark the close of an contour with an arc.
A ShaderFilledPath represents a path that is drawn as a rectangle where the fragment shader acting on...
unsigned int number_points(void) const
Base class to describe how to interpolate from one point of a PathContour to the next, i.e. describes the shape of an edge.
void to_point(const vec2 &pt, enum PathEnums::edge_type_t etp)
contour_start(const vec2 &pt)
Tag class to mark the close of a contour.
contour_start(float x, float y)
Derived class of interpolator_base to indicate a Bezier curve. Supports Bezier curves of any degree...
flat(PathContour &contour, const vec2 &end, enum PathEnums::edge_type_t tp)
void swap(reference_counted_ptr< T > &lhs, reference_counted_ptr< T > &rhs)
void close_arc(float angle, enum PathEnums::edge_type_t etp)
An PathContour represents a single contour within a Path.
void add_control_point(const vec2 &pt)
void clear_control_points(void)
virtual unsigned int recursion_depth(void) const =0
bool approximate_bounding_box(Rect *out_bb) const
Wraps the data to specify an arc.
A c_array is a wrapper over a C pointer with a size parameter to facilitate bounds checking and provi...
Defines default reference counting base classes.
void close(enum PathEnums::edge_type_t etp)
A flat interpolator represents a flat edge.
const vec2 & point(unsigned int I) const
control_point(float x, float y)
Provides an interface to resume from a previous tessellation of a interpolator_base derived object...
interpolator_generic(PathContour &contour, const vec2 &end, enum PathEnums::edge_type_t tp)
void start(const vec2 &pt)
A Path represents a collection of PathContour objects.
Interpolator generic implements tessellation by recursion and relying on analytic derivative provided...
Class for which copy ctor and assignment operator are private functions.
const reference_counted_ptr< const interpolator_base > & prev_interpolator(void)
unsigned int number_interpolators(void) const
A wrapper over a dynamic array of segment objects; segment values added to SegmentStorage must be add...
const reference_counted_ptr< const interpolator_base > & interpolator(unsigned int I) const
void to_arc(float angle, const vec2 &pt, enum PathEnums::edge_type_t etp)
file reference_counted.hpp