FastLED 3.9.15
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
8namespace fl {
9
10class XYMap;
11
17
24CRGB sample(const CRGB *grid, const XYMap &xyMap, float x, float y,
26
28CRGB sampleBilinear(const CRGB *grid, const XYMap &xyMap, float x, float y);
29
31CRGB sampleNearest(const CRGB *grid, const XYMap &xyMap, float x, float y);
32
33} // 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 sampleNearest(const CRGB *grid, const XYMap &xyMap, float x, float y)
Nearest-neighbor sample from a 2D CRGB grid.
CRGB sample(const CRGB *grid, const XYMap &xyMap, float x, float y, SampleMode mode)
Sample a pixel from a 2D CRGB grid at floating-point coordinates.
Definition sample.cpp.hpp:9
SampleMode
Interpolation mode for sampling a 2D grid.
Definition sample.h:13
@ SAMPLE_BILINEAR
Bilinear interpolation (smooth)
Definition sample.h:15
@ SAMPLE_NEAREST
Nearest neighbor (fast, pixelated)
Definition sample.h:14
CRGB sampleBilinear(const CRGB *grid, const XYMap &xyMap, float x, float y)
Bilinear interpolation sample from a 2D CRGB grid.
Base definition for an LED controller.
Definition crgb.hpp:179