framebuffer¶
- janim.render.framebuffer.qt_framebuffer_patch(ctx: Context)¶
自动在 with 前获取 GL 对象,在 with 后重设 GL 对象(如果是 Qt 的 Framebuffer),以保证与 Qt 的兼容
- class janim.render.framebuffer.FrameBuffer(ctx: Context, pw: int, ph: int, rgb: tuple[float, float, float], transparent: bool)¶
基类:
object- clear() None¶
- context()¶
- use(index: int) None¶
- unpremultiply() None¶
将当前 FBO 的 PMA 内容通过 GPU pass 转为 straight alpha,结果写回自身
- read() bytes¶
- get_image() Image¶
- release() None¶