mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 21:30:03 -04:00
@@ -613,6 +613,8 @@ struct FlatteningParameters {
|
||||
impl FlatteningParameters {
|
||||
// https://raphlinus.github.io/graphics/curves/2019/12/23/flatten-quadbez.html
|
||||
pub fn from_curve(curve: &QuadraticBezierShape, tolerance: f32) -> Self {
|
||||
#![expect(clippy::useless_let_if_seq)]
|
||||
|
||||
// Map the quadratic bézier segment to y = x^2 parabola.
|
||||
let from = curve.points[0];
|
||||
let ctrl = curve.points[1];
|
||||
|
||||
@@ -1165,6 +1165,7 @@ mod tests {
|
||||
]
|
||||
}
|
||||
|
||||
#[expect(clippy::print_stdout)]
|
||||
#[test]
|
||||
fn test_split_paragraphs() {
|
||||
for pixels_per_point in [1.0, 2.0_f32.sqrt(), 2.0] {
|
||||
|
||||
@@ -554,6 +554,8 @@ fn halign_and_justify_row(
|
||||
wrap_width: f32,
|
||||
justify: bool,
|
||||
) {
|
||||
#![expect(clippy::useless_let_if_seq)] // False positive
|
||||
|
||||
let row = Arc::make_mut(&mut placed_row.row);
|
||||
|
||||
if row.glyphs.is_empty() {
|
||||
|
||||
Reference in New Issue
Block a user