FastLED 3.10.8
Loading...
Searching...
No Matches
sample.h
Go to the documentation of this file.
1#pragma once
2
5
6#include "fl/gfx/crgb.h"
7#include "fl/stl/noexcept.h"
8
9namespace fl {
10
11class XYMap;
12
18
25CRGB sample(const CRGB *grid, const XYMap &xyMap, float x, float y,
27
29CRGB sampleBilinear(const CRGB *grid, const XYMap &xyMap, float x, float y) FL_NO_EXCEPT;
30
32CRGB sampleNearest(const CRGB *grid, const XYMap &xyMap, float x, float y) FL_NO_EXCEPT;
33
34} // namespace fl
fl::XYMap xyMap
int y
Definition simple.h:93
int x
Definition simple.h:92
Defines the 8-bit red, green, and blue (RGB) pixel type in the fl namespace.
fl::CRGB CRGB
Definition crgb.h:25
CRGB sample(const CRGB *grid, const XYMap &xyMap, float x, float y, SampleMode mode) FL_NO_EXCEPT
Sample a pixel from a 2D CRGB grid at floating-point coordinates.
CRGB sampleBilinear(const CRGB *grid, const XYMap &xyMap, float x, float y) FL_NO_EXCEPT
Bilinear interpolation sample from a 2D CRGB grid.
SampleMode
Interpolation mode for sampling a 2D grid.
Definition sample.h:14
@ SAMPLE_BILINEAR
Bilinear interpolation (smooth)
Definition sample.h:16
@ SAMPLE_NEAREST
Nearest neighbor (fast, pixelated)
Definition sample.h:15
CRGB sampleNearest(const CRGB *grid, const XYMap &xyMap, float x, float y) FL_NO_EXCEPT
Nearest-neighbor sample from a 2D CRGB grid.
Base definition for an LED controller.
Definition crgb.hpp:179
#define FL_NO_EXCEPT