mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Update VMobject.has_fill and has_stroke
This commit is contained in:
parent
e73ae78987
commit
966e2c9790
1 changed files with 2 additions and 2 deletions
|
@ -377,10 +377,10 @@ class VMobject(Mobject):
|
||||||
return self.get_stroke_color()
|
return self.get_stroke_color()
|
||||||
|
|
||||||
def has_stroke(self) -> bool:
|
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:
|
def has_fill(self) -> bool:
|
||||||
return any(self.get_fill_opacities())
|
return any(self.data['fill_rgba'][:, 3])
|
||||||
|
|
||||||
def get_opacity(self) -> float:
|
def get_opacity(self) -> float:
|
||||||
if self.has_fill():
|
if self.has_fill():
|
||||||
|
|
Loading…
Add table
Reference in a new issue