mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Add getter/setter for anti_alias_width
This commit is contained in:
parent
ab03a0cfba
commit
c7ef4eefbc
1 changed files with 7 additions and 0 deletions
|
@ -329,6 +329,10 @@ class VMobject(Mobject):
|
||||||
self.set_stroke(opacity=opacity, recurse=recurse)
|
self.set_stroke(opacity=opacity, recurse=recurse)
|
||||||
return self
|
return self
|
||||||
|
|
||||||
|
def set_anti_alias_width(self, anti_alias_width: float, recurse: bool = True):
|
||||||
|
self.set_uniform(recurse, anti_alias_width=anti_alias_width)
|
||||||
|
return self
|
||||||
|
|
||||||
def fade(self, darkness: float = 0.5, recurse: bool = True):
|
def fade(self, darkness: float = 0.5, recurse: bool = True):
|
||||||
mobs = self.get_family() if recurse else [self]
|
mobs = self.get_family() if recurse else [self]
|
||||||
for mob in mobs:
|
for mob in mobs:
|
||||||
|
@ -399,6 +403,9 @@ class VMobject(Mobject):
|
||||||
return self.get_fill_color()
|
return self.get_fill_color()
|
||||||
return self.get_stroke_color()
|
return self.get_stroke_color()
|
||||||
|
|
||||||
|
def get_anti_alias_width(self):
|
||||||
|
return self.uniforms["anti_alias_width"]
|
||||||
|
|
||||||
def has_stroke(self) -> bool:
|
def has_stroke(self) -> bool:
|
||||||
return any(self.data['stroke_width']) and any(self.data['stroke_rgba'][:, 3])
|
return any(self.data['stroke_width']) and any(self.data['stroke_rgba'][:, 3])
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue