Wrap native text within occurrence constraints and preserve paint bounds
Verify Tessera GUI / verify (push) Failing after 7m33s
Verify Tessera GUI / verify (push) Failing after 7m33s
This commit is contained in:
@@ -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")),
|
||||
|
||||
Reference in New Issue
Block a user