This commit is contained in:
dbr 2021-10-12 13:26:33 +11:00
parent eb1bd01179
commit 416272a48a
2 changed files with 4 additions and 13 deletions

View File

@ -114,7 +114,7 @@ fn main() {
[o[0] + 0.0, o[1] + 100.0],
[o[0] + 0.0, o[1] + 0.0],
],
[1.0, 0.0, 1.0]
[1.0, 0.0, 1.0],
)
.build();
@ -128,7 +128,7 @@ fn main() {
[o[0] + 120.0 + 0.0, o[1] + 100.0],
[o[0] + 120.0 + 0.0, o[1] + 0.0],
],
[0.0, 1.0, 1.0]
[0.0, 1.0, 1.0],
)
.filled(true)
.build();

View File

@ -230,11 +230,7 @@ impl<'ui> DrawListMut<'ui> {
/// polygon, if not filled is drawn as a line specified by
/// [`PolyLine::thickness`] (default 1.0)
#[doc(alias = "AddPolyline", alias = "AddConvexPolyFilled")]
pub fn add_polyline<C, P>(
&'ui self,
points: Vec<P>,
c: C,
) -> Polyline<'ui>
pub fn add_polyline<C, P>(&'ui self, points: Vec<P>, c: C) -> Polyline<'ui>
where
C: Into<ImColor32>,
P: Into<MintVec2>,
@ -516,11 +512,7 @@ pub struct Polyline<'ui> {
}
impl<'ui> Polyline<'ui> {
fn new<C, P>(
draw_list: &'ui DrawListMut<'_>,
points: Vec<P>,
c: C,
) -> Self
fn new<C, P>(draw_list: &'ui DrawListMut<'_>, points: Vec<P>, c: C) -> Self
where
C: Into<ImColor32>,
P: Into<MintVec2>,
@ -573,7 +565,6 @@ impl<'ui> Polyline<'ui> {
}
}
/// Represents a rectangle about to be drawn
#[must_use = "should call .build() to draw the object"]
pub struct Rect<'ui> {