From 966e2c97903e98f61bddfcbe45489bf1dce3c86a Mon Sep 17 00:00:00 2001 From: Grant Sanderson Date: Tue, 27 Dec 2022 22:18:54 -0800 Subject: [PATCH] Update VMobject.has_fill and has_stroke --- manimlib/mobject/types/vectorized_mobject.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manimlib/mobject/types/vectorized_mobject.py b/manimlib/mobject/types/vectorized_mobject.py index 450cadf4..d38452a6 100644 --- a/manimlib/mobject/types/vectorized_mobject.py +++ b/manimlib/mobject/types/vectorized_mobject.py @@ -377,10 +377,10 @@ class VMobject(Mobject): return self.get_stroke_color() def has_stroke(self) -> bool: - return any(self.get_stroke_widths()) and any(self.get_stroke_opacities()) + return any(self.data['stroke_width']) and any(self.data['stroke_rgba'][:, 3]) def has_fill(self) -> bool: - return any(self.get_fill_opacities()) + return any(self.data['fill_rgba'][:, 3]) def get_opacity(self) -> float: if self.has_fill():