#include <cairo.h>
#include "render.h"
Go to the source code of this file.
|
bl_render_config | bl_make_render_config (double width, double height, double frames, double fps) |
|
void | _render_frames (bl_render_config config, char *gif_name, bl_render_callback render, char *tmp, int num_threads) |
|
void | _convert_frames_to_gif (char *frames_dir, char *file_name, double fps) |
|
void | _convert_frames_to_video (bl_render_config config, char *frames_dir, char *file_name, double fps) |
|
◆ _convert_frames_to_gif()
void _convert_frames_to_gif |
( |
char * |
frames_dir, |
|
|
char * |
file_name, |
|
|
double |
fps |
|
) |
| |
Converts the frames in the temp folder into an animated gif. Internal use only.
- Parameters
-
char | *frames_dir Where the frames are stored. |
char | *file_name The name of the output file. |
double | fps. Frames per second for the animation. |
◆ _convert_frames_to_video()
void _convert_frames_to_video |
( |
bl_render_config |
config, |
|
|
char * |
frames_dir, |
|
|
char * |
file_name, |
|
|
double |
fps |
|
) |
| |
Converts the frames in the temp folder into a video. Internal use only.
- Parameters
-
char | *frames_dir Where the frames are stored. |
char | *file_name The name of the output file. |
double | fps. Frames per second for the animation. |
◆ _render_frames()
Renders each frame of an animation into png files in a folder. Internal use only.
- Parameters
-
bl_render_config | config Contains information on how to render the frames. |
char | *gif_name The output file name. |
bl_render_callback | *render The function that draws each frame. |
char | *tmp The file to store the frames in. Usually deleted post-render. |
int | num_threads How many threads to use to render this animation. |
◆ bl_make_render_config()
bl_render_config bl_make_render_config |
( |
double |
width, |
|
|
double |
height, |
|
|
double |
frames, |
|
|
double |
fps |
|
) |
| |
Creates animation/image config
Creates an instance of bl_render_config
for creating an animation or image.
- Parameters
-
double | width The width of the image or animation. |
double | height The height of the image or animation. |
double | frames The number of frames in the animation. Equal to the fps * seconds of animation. |
double | fps Frames per second of the animation. |
- Returns
- bl_render_config