Allow for setting flat stroke in VMobject.set_stroke

This commit is contained in:
Grant Sanderson 2024-08-07 14:54:37 -05:00
parent 099aaaee43
commit bf43a648a4

View file

@ -203,6 +203,7 @@ class VMobject(Mobject):
width: float | Iterable[float] | None = None,
opacity: float | Iterable[float] | None = None,
background: bool | None = None,
flat: bool | None = None,
recurse: bool = True
) -> Self:
self.set_rgba_array_by_color(color, opacity, 'stroke_rgba', recurse)
@ -221,6 +222,9 @@ class VMobject(Mobject):
for mob in self.get_family(recurse):
mob.stroke_behind = background
if flat is not None:
self.set_flat_stroke(flat)
self.note_changed_stroke()
return self