ColorWindowEntry
pub struct ColorWindowEntry
One colour window as the camera holds it.
Carries the band's own id, which ColorWindow does not: an id is
how a window is addressed and not a property of it, so it is an
argument on the way in and a field on the way out.
The colours are a count, not a table
colors is ColorSource::Palette or
ColorSource::Table(&[]): never a populated slice. The
SDK will not hand out a pointer into its own memory, so a read-back
band reports how many colours it has and not which. Use
Camera::color_window_colors for the table, and
ColorWindow::keeping_colors when writing a read-back band
back.
ColorWindowEntry — fields
id: u32
The id this band is addressed by.
min_c: f32
Lower edge of the band, in the SDK's temperature unit (Celsius
unless crate::set_temperature_unit chose Fahrenheit).
max_c: f32
Upper edge of the band, in the SDK's temperature unit.
palette: Palette
Its palette.
opacity: f32
How strongly it is drawn.
motion_only: bool
Whether it colours only where motion was detected.
color_count: usize
How many colours its own table holds. Zero when it is coloured from the palette.
Read Camera::color_window_colors for the colours
themselves; this is deliberately only the count, because that
is all the ABI returns here.
ColorWindowEntry — methods
pub fn to_window(&self) -> ColorWindow<'static>
This band as something Camera::set_color_window will take,
keeping whatever table it already has.
The ordinary editor operation (nudge a band's max_c and
write it back), and the reason ColorSource::Keep exists:
writing it back with ColorSource::Palette would discard a
ramp this struct never saw.