pub struct VideoWallWindow {
pub pos_x: u16,
pub pos_y: u16,
pub width: u16,
pub height: u16,
pub raster_w: u16,
pub raster_h: u16,
}Expand description
Where a video-wall sink’s window sits, and the picture it was measured against.
The raster travels with the window because only the sender knows what the installer drew against; a sink deriving it from what it happens to be showing would place the window against the wrong picture.
Nothing on the receiving side is guaranteed to check any of this, so
VideoWallWindow::validate runs before every send. See
crate::Remote::store_video_wall for why that matters.
Fields§
§pos_x: u16Window origin, horizontal. A multiple of VIDEO_WALL_POS_ALIGN.
pos_y: u16Window origin, vertical. No alignment constraint.
width: u16Window width. A multiple of VIDEO_WALL_WIDTH_ALIGN, and at least
VIDEO_WALL_MIN_SIZE unless it is zero.
height: u16Window height, at least VIDEO_WALL_MIN_SIZE unless it is zero. No
alignment constraint.
raster_w: u16Active picture width the window was measured against.
raster_h: u16Active picture height the window was measured against.
Implementations§
Source§impl VideoWallWindow
impl VideoWallWindow
Sourcepub const fn is_cleared(&self) -> bool
pub const fn is_cleared(&self) -> bool
Reports whether this window clears the wall rather than placing one.
Sourcepub fn validate(&self) -> Result<(), &'static str>
pub fn validate(&self) -> Result<(), &'static str>
Checks the geometry the sink is not guaranteed to check itself.
The three alignments follow the sink’s hardware and a live unit reports them over HTTP, so a caller with access to one can read them rather than trust the constants here. The containment rule has no such source: it is checked by the sink’s own HTTP path and by nothing on the mesh path, at any version.
A cleared window passes: zero is the protocol’s word for “clear”, not a window too small to draw.
Trait Implementations§
Source§impl Clone for VideoWallWindow
impl Clone for VideoWallWindow
Source§fn clone(&self) -> VideoWallWindow
fn clone(&self) -> VideoWallWindow
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more