MCPcopy Create free account
hub / github.com/GraphiteEditor/Graphite / lines_clipping

Method lines_clipping

node-graph/nodes/text/src/text_context.rs:184–188  ·  view source on GitHub ↗

Check if text lines are being clipped due to height constraints

(&mut self, text: &str, font: &Resource, typesetting: TypesettingConfig)

Source from the content-addressed store, hash-verified

182
183 /// Check if text lines are being clipped due to height constraints
184 pub fn lines_clipping(&mut self, text: &str, font: &Resource, typesetting: TypesettingConfig) -> bool {
185 let Some(max_height) = typesetting.max_height else { return false };
186 let bounds = self.bounding_box(text, font, typesetting, true);
187 max_height < bounds.y
188 }
189}

Callers 1

lines_clippingFunction · 0.80

Calls 1

bounding_boxMethod · 0.45

Tested by

no test coverage detected