We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Contour::from_rect()
1 parent 5eb346f commit e5eee41Copy full SHA for e5eee41
content/src/outline.rs
@@ -289,7 +289,7 @@ impl Contour {
289
290
#[inline]
291
pub fn from_rect(rect: RectF) -> Contour {
292
- let mut contour = Contour::new();
+ let mut contour = Contour::with_capacity(4);
293
contour.push_point(rect.origin(), PointFlags::empty(), false);
294
contour.push_point(rect.upper_right(), PointFlags::empty(), false);
295
contour.push_point(rect.lower_right(), PointFlags::empty(), false);
0 commit comments