Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Why did MobjectFromRegion not specify color?

Grant Sandersonf2b5c21c968b
diff --git a/mobject/image_mobject.py b/mobject/image_mobject.py
index bcf8a51fc..e38bcd58d 100644
--- a/mobject/image_mobject.py
+++ b/mobject/image_mobject.py
@@ -13,12 +13,12 @@ class ImageMobject(Mobject):
Automatically filters out black pixels
"""
DEFAULT_CONFIG = {
- "filter_color" : "black",
- "invert" : True,
- "use_cache" : True,
+ "filter_color" : "black",
+ "invert" : True,
+ "use_cache" : True,
"point_thickness" : 1,
- "scale_value" : 1.0,
- "should_center" : True
+ "scale_value" : 1.0,
+ "should_center" : True,
}
def __init__(self, image_file, **kwargs):
digest_locals(self)
@@ -109,10 +109,10 @@ class MobjectFromPixelArray(ImageMobject):
class MobjectFromRegion(MobjectFromPixelArray):
- def __init__(self, region, **kwargs):
+ def __init__(self, region, color = None, **kwargs):
MobjectFromPixelArray.__init__(
self,
- disp.paint_region(region),
+ disp.paint_region(region, color = color),
**kwargs
)