Wrap native text within occurrence constraints and preserve paint bounds
Verify Tessera GUI / verify (push) Failing after 7m33s

This commit is contained in:
2026-10-22 12:24:23 +08:00
parent 25275b515c
commit 7b5d3940fd
13 changed files with 470 additions and 45 deletions
+12
View File
@@ -104,12 +104,24 @@ fn decode(
if size.fract() != 0.0 || !(1.0..=8.0).contains(&size) {
return Err(invalid("paint text size must be an integer from 1 to 8"));
}
let wrap_bounds = match (
store.get_attr(command, "wrapWidth"),
store.get_attr(command, "wrapHeight"),
) {
(Err(VmError::AttributeNotFound(_)), Err(VmError::AttributeNotFound(_))) => None,
(Ok(_), Ok(_)) => Some([
number(store, command, "wrapWidth")?,
number(store, command, "wrapHeight")?,
]),
(Err(error), _) | (_, Err(error)) => return Err(error),
};
RenderCommand::Text {
x,
y,
value: text(store, command, "text")?,
size: size as u32,
color,
wrap_bounds,
}
}
_ => return Err(invalid("unsupported paint command kind")),