mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Fixed error with how ScreenRectangle inherited from Rectangle
This commit is contained in:
parent
b7cf5e82e3
commit
05bd710ebb
1 changed files with 6 additions and 3 deletions
|
@ -6,12 +6,15 @@ from manimlib.utils.config_ops import digest_config
|
|||
class ScreenRectangle(Rectangle):
|
||||
CONFIG = {
|
||||
"width_to_height_ratio": 16.0 / 9.0,
|
||||
"height": 4,
|
||||
"height": 4
|
||||
}
|
||||
|
||||
def generate_points(self):
|
||||
def __init__(self, **kwargs):
|
||||
digest_config(self, kwargs)
|
||||
self.width = self.width_to_height_ratio * self.height
|
||||
Rectangle.generate_points(self)
|
||||
Rectangle.__init__(
|
||||
self, height=self.height, width=self.width, **kwargs
|
||||
)
|
||||
|
||||
|
||||
class FullScreenRectangle(ScreenRectangle):
|
||||
|
|
Loading…
Add table
Reference in a new issue