mirror of
https://github.com/3b1b/manim.git
synced 2025-08-01 08:54:38 +08:00
Why did MobjectFromRegion not specify color?
This commit is contained in:
@ -18,7 +18,7 @@ class ImageMobject(Mobject):
|
|||||||
"use_cache" : True,
|
"use_cache" : True,
|
||||||
"point_thickness" : 1,
|
"point_thickness" : 1,
|
||||||
"scale_value" : 1.0,
|
"scale_value" : 1.0,
|
||||||
"should_center" : True
|
"should_center" : True,
|
||||||
}
|
}
|
||||||
def __init__(self, image_file, **kwargs):
|
def __init__(self, image_file, **kwargs):
|
||||||
digest_locals(self)
|
digest_locals(self)
|
||||||
@ -109,10 +109,10 @@ class MobjectFromPixelArray(ImageMobject):
|
|||||||
|
|
||||||
|
|
||||||
class MobjectFromRegion(MobjectFromPixelArray):
|
class MobjectFromRegion(MobjectFromPixelArray):
|
||||||
def __init__(self, region, **kwargs):
|
def __init__(self, region, color = None, **kwargs):
|
||||||
MobjectFromPixelArray.__init__(
|
MobjectFromPixelArray.__init__(
|
||||||
self,
|
self,
|
||||||
disp.paint_region(region),
|
disp.paint_region(region, color = color),
|
||||||
**kwargs
|
**kwargs
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user