HitLib 1.3.0
VEX V5 LED animation library for PROS
Loading...
Searching...
No Matches
hitlib::LedStrand::SpliceRegion Struct Reference

One independently placed override region for a custom splice mask. More...

#include <led_strand.hpp>

Public Attributes

uint8_t start
 First pixel index covered by this region.
uint8_t width
 Number of pixels covered.
SpliceRegionAnimKind kind
 What this region shows.
uint32_t color
 Foreground color (SOLID/PULSE/FLASH/FLOW/BITSCROLL).
uint32_t color2
 FLOW end color.
uint32_t bgColor
 PULSE/FLASH/TWINKLE/BITSCROLL background, and a GAUGE BAR's unlit part.
uint8_t runLength
 PULSE run length.
uint8_t speed
 PULSE/FLOW/RAINBOW/BITSCROLL animation speed.
uint32_t onMs
 FLASH lit duration (ms).
uint32_t offMs
 FLASH blank duration (ms).
bool seamless
 FLOW only.
bool invert
 Reverse direction: a BITSCROLL scrolls the other way, a GAUGE BAR fills from the far end of the region.
std::vector< uint32_t > palette
 Colors sparks are drawn from. An empty palette leaves the region dark.
uint8_t densityPct
 Share of the region lit at once (0-100).
uint8_t fadeStep
 Brightness step per tick, so bigger is faster.
uint8_t segmentWidth
 Pixels per lit run.
uint8_t spacing
 Background pixels between runs.
bool repeating
 Tile the pattern across the region, or scroll one copy.
LevelFn read
 Value this gauge follows, polled once per tick.
double emptyAt
 Reading at the bottom of the scale.
double fullAt
 Reading at the top of it.
bool wrap
 Cycle past fullAt instead of pinning at it.
uint8_t smoothing
 0-99, as in levelSource().
GaugeStyle style
 Whole-region color, or a bar.
GaugeBlend blend
 Blend between stops, or hold each.
std::vector< GaugeStopstops
 The scale, in the reading's own units.

Detailed Description

One independently placed override region for a custom splice mask.

Each region gets its own animation buffer, generated over just that region's width, and animates independently of every other region and of the base/overlay buffers. Unlike spliceMask()'s single shared overlay, every region here can show something different at once.

Member Data Documentation

◆ start

uint8_t hitlib::LedStrand::SpliceRegion::start

First pixel index covered by this region.

◆ width

uint8_t hitlib::LedStrand::SpliceRegion::width

Number of pixels covered.

◆ kind

SpliceRegionAnimKind hitlib::LedStrand::SpliceRegion::kind

What this region shows.

◆ color

uint32_t hitlib::LedStrand::SpliceRegion::color

Foreground color (SOLID/PULSE/FLASH/FLOW/BITSCROLL).

◆ color2

uint32_t hitlib::LedStrand::SpliceRegion::color2

FLOW end color.

◆ bgColor

uint32_t hitlib::LedStrand::SpliceRegion::bgColor

PULSE/FLASH/TWINKLE/BITSCROLL background, and a GAUGE BAR's unlit part.

◆ runLength

uint8_t hitlib::LedStrand::SpliceRegion::runLength

PULSE run length.

◆ speed

uint8_t hitlib::LedStrand::SpliceRegion::speed

PULSE/FLOW/RAINBOW/BITSCROLL animation speed.

◆ onMs

uint32_t hitlib::LedStrand::SpliceRegion::onMs

FLASH lit duration (ms).

◆ offMs

uint32_t hitlib::LedStrand::SpliceRegion::offMs

FLASH blank duration (ms).

◆ seamless

bool hitlib::LedStrand::SpliceRegion::seamless

FLOW only.

See flow().

◆ invert

bool hitlib::LedStrand::SpliceRegion::invert

Reverse direction: a BITSCROLL scrolls the other way, a GAUGE BAR fills from the far end of the region.

◆ palette

std::vector<uint32_t> hitlib::LedStrand::SpliceRegion::palette

Colors sparks are drawn from. An empty palette leaves the region dark.

◆ densityPct

uint8_t hitlib::LedStrand::SpliceRegion::densityPct

Share of the region lit at once (0-100).

◆ fadeStep

uint8_t hitlib::LedStrand::SpliceRegion::fadeStep

Brightness step per tick, so bigger is faster.

◆ segmentWidth

uint8_t hitlib::LedStrand::SpliceRegion::segmentWidth

Pixels per lit run.

◆ spacing

uint8_t hitlib::LedStrand::SpliceRegion::spacing

Background pixels between runs.

◆ repeating

bool hitlib::LedStrand::SpliceRegion::repeating

Tile the pattern across the region, or scroll one copy.

◆ read

LevelFn hitlib::LedStrand::SpliceRegion::read

Value this gauge follows, polled once per tick.

nullptr leaves the region hand-driven through setRegionLevel().

◆ emptyAt

double hitlib::LedStrand::SpliceRegion::emptyAt

Reading at the bottom of the scale.

◆ fullAt

double hitlib::LedStrand::SpliceRegion::fullAt

Reading at the top of it.

◆ wrap

bool hitlib::LedStrand::SpliceRegion::wrap

Cycle past fullAt instead of pinning at it.

◆ smoothing

uint8_t hitlib::LedStrand::SpliceRegion::smoothing

0-99, as in levelSource().

◆ style

GaugeStyle hitlib::LedStrand::SpliceRegion::style

Whole-region color, or a bar.

◆ blend

GaugeBlend hitlib::LedStrand::SpliceRegion::blend

Blend between stops, or hold each.

◆ stops

std::vector<GaugeStop> hitlib::LedStrand::SpliceRegion::stops

The scale, in the reading's own units.

Empty falls back to color at emptyAt blending to color2 at fullAt, so a two-color gauge needs no stops at all.