#[derive(Clone, Debug)]
pub struct CIEXYZTriple {
pub red: crate::wmf::parser::CIEXYZ,
pub green: crate::wmf::parser::CIEXYZ,
pub blue: crate::wmf::parser::CIEXYZ,
}
impl CIEXYZTriple {
#[cfg_attr(feature = "tracing", tracing::instrument(
level = tracing::Level::TRACE,
skip_all,
err(level = tracing::Level::ERROR, Display),
))]
pub fn parse<R: crate::wmf::Read>(
buf: &mut R,
) -> Result<(Self, usize), crate::wmf::parser::ParseError> {
let ((red, red_bytes), (green, green_bytes), (blue, blue_bytes)) = (
crate::wmf::parser::CIEXYZ::parse(buf)?,
crate::wmf::parser::CIEXYZ::parse(buf)?,
crate::wmf::parser::CIEXYZ::parse(buf)?,
);
let consumed_bytes = red_bytes + green_bytes + blue_bytes;
Ok((Self { red, green, blue }, consumed_bytes))
}
}