FastLED
3.9.15
Loading...
Searching...
No Matches
draw_context.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <stdint.h>
4
#include "
fl/namespace.h
"
5
#include "
crgb.h
"
6
7
namespace
fl
{
8
9
// Abstract base class for effects on a strip/grid of LEDs.
10
11
struct
_DrawContext
{
12
uint32_t
now
;
13
CRGB
*
leds
;
14
uint16_t
frame_time
= 0;
15
float
speed
= 1.0f;
16
uint8_t*
alpha_channel
=
nullptr
;
17
_DrawContext
(
18
uint32_t
now
,
19
CRGB
*
leds
,
20
uint16_t
frame_time
= 0,
21
float
speed
= 1.0f,
22
uint8_t*
alpha_channel
=
nullptr
23
):
now
(
now
),
24
leds
(
leds
),
25
frame_time
(
frame_time
),
26
speed
(
speed
),
27
alpha_channel
(
alpha_channel
) {}
28
};
29
30
}
// namespace fl
31
crgb.h
Defines the red, green, and blue (RGB) pixel struct.
namespace.h
Implements the FastLED namespace macros.
fl
Implements a simple red square effect for 2D LED grids.
Definition
crgb.h:16
CRGB
Representation of an RGB pixel (Red, Green, Blue)
Definition
crgb.h:54
fl::_DrawContext::_DrawContext
_DrawContext(uint32_t now, CRGB *leds, uint16_t frame_time=0, float speed=1.0f, uint8_t *alpha_channel=nullptr)
Definition
draw_context.h:17
fl::_DrawContext::now
uint32_t now
Definition
draw_context.h:12
fl::_DrawContext::frame_time
uint16_t frame_time
Definition
draw_context.h:14
fl::_DrawContext::leds
CRGB * leds
Definition
draw_context.h:13
fl::_DrawContext::speed
float speed
Definition
draw_context.h:15
fl::_DrawContext::alpha_channel
uint8_t * alpha_channel
Definition
draw_context.h:16
fx
detail
draw_context.h
Generated on Fri Apr 18 2025 03:39:31 for FastLED by
1.13.2