MCPcopy Create free account
hub / github.com/echosoar/canvas-cli / parse_round_rect_args

Function parse_round_rect_args

cli/src/main.rs:152–169  ·  view source on GitHub ↗
(s: &str)

Source from the content-addressed store, hash-verified

150}
151
152fn parse_round_rect_args(s: &str) -> Option<(f64, f64, f64, f64, Vec<f64>)> {
153 let (x, rest) = split_next_token(s)?;
154 let (y, rest) = split_next_token(rest)?;
155 let (width, rest) = split_next_token(rest)?;
156 let (height, rest) = split_next_token(rest)?;
157 let radii = parse_number_list(rest);
158 if radii.is_empty() {
159 return None;
160 }
161
162 Some((
163 parse_float(x),
164 parse_float(y),
165 parse_float(width),
166 parse_float(height),
167 radii,
168 ))
169}
170
171/// Stores either a linear or radial gradient
172enum Gradient {

Callers 1

execute_commandsFunction · 0.85

Calls 3

split_next_tokenFunction · 0.85
parse_floatFunction · 0.85
parse_number_listFunction · 0.70

Tested by

no test coverage detected