FastLED 3.9.15
Loading...
Searching...
No Matches
fl::XYPath Class Reference

Detailed Description

Definition at line 38 of file xypath.h.

#include <xypath.h>

+ Inheritance diagram for fl::XYPath:
+ Collaboration diagram for fl::XYPath:

Public Types

using AlphaFunction = fl::function<uint8_t(float)>
 
using xy_brightness = fl::pair<vec2f, uint8_t>
 

Public Member Functions

 XYPath (XYPathGeneratorPtr path, TransformFloat transform=TransformFloat())
 
virtual ~XYPath ()
 
vec2f at (float alpha)
 
vec2f at (float alpha, const TransformFloat &tx)
 
xy_brightness at_brightness (float alpha)
 
Tile2x2_u8 at_subpixel (float alpha)
 
void drawColor (const CRGB &color, float from, float to, Leds *leds, int steps=-1)
 
void drawGradient (const Gradient &gradient, float from, float to, Leds *leds, int steps=-1)
 
bool hasDrawBounds () const
 
Str name () const
 
void rasterize (float from, float to, int steps, XYRasterU8Sparse &raster, AlphaFunction *optional_alpha_gen=nullptr)
 
void setDrawBounds (uint16_t width, uint16_t height)
 
void setScale (float scale)
 
void setTransform (const TransformFloat &transform)
 
TransformFloattransform ()
 
- Public Member Functions inherited from fl::Referent
virtual int ref_count () const
 

Static Public Member Functions

static XYPathPtr NewArchimedeanSpiralPath ()
 
static XYPathPtr NewArchimedeanSpiralPath (uint16_t width, uint16_t height)
 
static XYPathPtr NewCatmullRomPath (uint16_t width=0, uint16_t height=0, const Ptr< CatmullRomParams > &params=NewPtr< CatmullRomParams >())
 
static XYPathPtr NewCirclePath ()
 
static XYPathPtr NewCirclePath (uint16_t width, uint16_t height)
 
static XYPathPtr NewCustomPath (const fl::function< vec2f(float)> &path, const rect< int > &drawbounds=rect< int >(), const TransformFloat &transform=TransformFloat(), const Str &name=xypath_detail::unique_missing_name())
 
static XYPathPtr NewGielisCurvePath (uint16_t width=0, uint16_t height=0, const Ptr< GielisCurveParams > &params=NewPtr< GielisCurveParams >())
 
static XYPathPtr NewHeartPath ()
 
static XYPathPtr NewHeartPath (uint16_t width, uint16_t height)
 
static XYPathPtr NewLinePath (const Ptr< LinePathParams > &params=NewPtr< LinePathParams >())
 
static XYPathPtr NewLinePath (float x0, float y0, float x1, float y1)
 
static XYPathPtr NewPhyllotaxisPath (uint16_t width=0, uint16_t height=0, const Ptr< PhyllotaxisParams > &args=NewPtr< PhyllotaxisParams >())
 
static XYPathPtr NewPointPath (float x, float y)
 
static XYPathPtr NewRosePath (uint16_t width=0, uint16_t height=0, const Ptr< RosePathParams > &params=NewPtr< RosePathParams >())
 

Private Member Functions

int calculateSteps (float from, float to)
 

Private Attributes

scoped_ptr< XYRasterU8SparsemOptionalRaster
 
XYPathGeneratorPtr mPath
 
XYPathRendererPtr mPathRenderer
 

Additional Inherited Members

- Protected Member Functions inherited from fl::Referent
 Referent ()
 
 Referent (const Referent &)
 
 Referent (Referent &&)
 
virtual ~Referent ()
 
virtual void destroy () const
 
Referentoperator= (const Referent &)
 
Referentoperator= (Referent &&)
 
virtual void ref () const
 
virtual void unref () const
 

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