|
FastUIDraw
|
An arc is for connecting one point to the next via an arc of a circle. 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) |
An arc is for connecting one point to the next via an arc of a circle.
| fastuidraw::PathContour::arc::arc | ( | PathContour & | contour, |
| float | angle, | ||
| const vec2 & | end, | ||
| enum PathEnums::edge_type_t | tp | ||
| ) |
Ctor.
| 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 |
| angle | The angle of the arc in radians, the value must not be a multiple of 2*FASTUIDRAW_PI. Assuming a coordinate system where y-increases vertically and x-increases to the right, a positive value indicates to have the arc go counter-clockwise, a negative angle for the arc to go clockwise. |
| end | end 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.
| range_type<float> fastuidraw::PathContour::arc::angle | ( | void | ) | const |
Returns the starting and ending angle of the arc each in radians.
|
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.
| vec2 fastuidraw::PathContour::arc::center | ( | void | ) | const |
Returns the center of the arc.
|
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 produce the arc-tessellation from start_pt() to end_pt(). In addition, for recursive tessellation, returns the tessellation state to be queried for recursion depth and reused to refine the tessellation. If the tessellation routine is not recursive in nature, return nullptr.
| tess_params | tessellation parameters |
| out_data | location to which to write the tessellations |
| out_max_distance | location to which to write an upperbound for the distance between the curve and the tesseallation approximation. |
Implements fastuidraw::PathContour::interpolator_base.
1.8.13