FastLED 3.9.15
Loading...
Searching...
No Matches
sample.h File Reference

Detailed Description

2D grid sampling with bilinear and nearest-neighbor interpolation

Definition in file sample.h.

#include "fl/gfx/crgb.h"
+ Include dependency graph for sample.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  fl
 Base definition for an LED controller.
 

Enumerations

enum class  fl::SampleMode { fl::SAMPLE_NEAREST , fl::SAMPLE_BILINEAR }
 Interpolation mode for sampling a 2D grid. More...
 

Functions

CRGB fl::sample (const CRGB *grid, const XYMap &xyMap, float x, float y, SampleMode mode=SampleMode::SAMPLE_BILINEAR)
 Sample a pixel from a 2D CRGB grid at floating-point coordinates.
 
CRGB fl::sampleBilinear (const CRGB *grid, const XYMap &xyMap, float x, float y)
 Bilinear interpolation sample from a 2D CRGB grid.
 
CRGB fl::sampleNearest (const CRGB *grid, const XYMap &xyMap, float x, float y)
 Nearest-neighbor sample from a 2D CRGB grid.