mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Minor Bug fixed: window's bg color now changing.
This commit is contained in:
parent
1a65498f97
commit
04295ec177
1 changed files with 3 additions and 4 deletions
|
@ -6,7 +6,6 @@ import OpenGL.GL as gl
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
||||||
from manimlib.camera.camera_frame import CameraFrame
|
from manimlib.camera.camera_frame import CameraFrame
|
||||||
from manimlib.constants import ASPECT_RATIO
|
|
||||||
from manimlib.constants import BLACK
|
from manimlib.constants import BLACK
|
||||||
from manimlib.constants import DEFAULT_FPS
|
from manimlib.constants import DEFAULT_FPS
|
||||||
from manimlib.constants import DEFAULT_PIXEL_HEIGHT, DEFAULT_PIXEL_WIDTH
|
from manimlib.constants import DEFAULT_PIXEL_HEIGHT, DEFAULT_PIXEL_WIDTH
|
||||||
|
@ -127,7 +126,7 @@ class Camera(object):
|
||||||
def clear(self) -> None:
|
def clear(self) -> None:
|
||||||
self.fbo.clear(*self.background_rgba)
|
self.fbo.clear(*self.background_rgba)
|
||||||
if self.window:
|
if self.window:
|
||||||
self.window.clear()
|
self.window.clear(*self.background_rgba)
|
||||||
|
|
||||||
def blit(self, src_fbo, dst_fbo):
|
def blit(self, src_fbo, dst_fbo):
|
||||||
"""
|
"""
|
||||||
|
@ -221,8 +220,8 @@ class Camera(object):
|
||||||
frame_height = frame_width / aspect_ratio
|
frame_height = frame_width / aspect_ratio
|
||||||
else:
|
else:
|
||||||
frame_width = aspect_ratio * frame_height
|
frame_width = aspect_ratio * frame_height
|
||||||
self.frame.set_height(frame_height, stretch=true)
|
self.frame.set_height(frame_height, stretch=True)
|
||||||
self.frame.set_width(frame_width, stretch=true)
|
self.frame.set_width(frame_width, stretch=True)
|
||||||
|
|
||||||
# Rendering
|
# Rendering
|
||||||
def capture(self, *mobjects: Mobject) -> None:
|
def capture(self, *mobjects: Mobject) -> None:
|
||||||
|
|
Loading…
Add table
Reference in a new issue