FastUIDraw
|
Derived class of interpolator_base to indicate a Bezier curve. Supports Bezier curves of any degree. More...
#include <path.hpp>
Additional Inherited Members | |
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) |
Derived class of interpolator_base to indicate a Bezier curve. Supports Bezier curves of any degree.
fastuidraw::PathContour::bezier::bezier | ( | PathContour & | contour, |
const vec2 & | ct, | ||
const vec2 & | end, | ||
enum PathEnums::edge_type_t | tp | ||
) |
Ctor. One control point, thus interpolation is a quadratic curve.
contour | PathContour to which to add the interpolator. The interpolator is added to the contour at the interpolator's construction. The start point is computed from the current state of the PathContour |
ct | control point |
end | end of curve |
tp | nature the edge represented by this interpolator_base |
fastuidraw::PathContour::bezier::bezier | ( | PathContour & | contour, |
const vec2 & | ct1, | ||
const vec2 & | ct2, | ||
const vec2 & | end, | ||
enum PathEnums::edge_type_t | tp | ||
) |
Ctor. Two control points, thus interpolation is a cubic curve.
contour | PathContour to which to add the interpolator. The interpolator is added to the contour at the interpolator's construction. The start point is computed from the current state of the PathContour |
ct1 | 1st control point |
ct2 | 2nd control point |
end | end point of curve |
tp | nature the edge represented by this interpolator_base |
fastuidraw::PathContour::bezier::bezier | ( | PathContour & | contour, |
c_array< const vec2 > | control_pts, | ||
const vec2 & | end, | ||
enum PathEnums::edge_type_t | tp | ||
) |
Ctor. Iterator range defines the control points of the bezier curve.
contour | PathContour to which to add the interpolator. The interpolator is added to the contour at the interpolator's construction. The start point is computed from the current state of the PathContour |
control_pts | control points of the bezier curve created, can be any size allowing bezier curves of arbitrary degree |
end | end point of curve |
tp | nature the edge represented by this interpolator_base |
|
virtual |
To be optionally implemented by a derived class to add this interpolator to a ShaderFilledPath::Builder. A return code of routine_fail means that the interpolator cannot be realized in such a way to be added and a Path that includes such an interpolator in a closed contour will be unable to realized a ShaderFilledPath value and Path::shader_filled_path() will return a null handle. Default implementation is to return routine_fail.
builder | object to which to add interpolator. |
tol | error goal between the interpolator and how it is realized on the ShaderFilledPath::Builder |
Reimplemented from fastuidraw::PathContour::interpolator_base.
|
virtual |
To be implemented by a derived class to return a fast (and approximate) bounding box for the interpolator.
out_bb | (output) location to which to write the bounding box value |
Implements fastuidraw::PathContour::interpolator_base.
|
virtual |
To be implemented by a derived class to create and return a deep copy of the interpolator object.
Implements fastuidraw::PathContour::interpolator_base.
|
virtual |
To be implemented by a derived class to return true if the interpolator is flat, i.e. is just a line segment connecting start_pt() to end_pt().
Implements fastuidraw::PathContour::interpolator_base.
|
virtual |
To be implemented by a derived class to return a reasonable lower bound on the needed number of times the edge should be cut in half in order to capture its shape.
Implements fastuidraw::PathContour::interpolator_generic.
Returns the control points of the Bezier curve with c_array<const vec2>::front() having the same value as start_pt() and c_array<const vec2>::back() having the same value as end_pt().
|
virtual |
To be implemented by a derived to assist in recursive tessellation.
in_region | region to divide in half, a nullptr value indicates that the region is the entire interpolator. |
out_regionA | location to which to write the first half |
out_regionB | location to which to write the second half |
out_p | location to which to write the position of the point on the curve in the middle (with repsect to time) of in_region |
Implements fastuidraw::PathContour::interpolator_generic.