4#ifndef _SCENEPIC_CANVAS2D_H_
5#define _SCENEPIC_CANVAS2D_H_
32 std::shared_ptr<Frame2D>
create_frame(
const std::string& frame_id =
"");
80 const std::map<std::string, LayerSettings> layer_settings);
94 std::string m_canvas_id;
95 std::string m_media_id;
96 std::vector<std::string> m_layer_ids;
97 std::map<std::string, LayerSettings> m_layer_settings;
98 std::map<std::string, std::uint8_t> m_layer_lookup;
99 std::vector<std::shared_ptr<Frame2D>> m_frames;
100 Color m_background_color;
106 std::size_t m_num_frames;
A 2D canvas that can contain a number of Frame2Ds.
Definition: canvas2d.h:21
const std::string & canvas_id() const
A unique identifier for the canvas.
void clear_script()
Call this if you are dumping a ScenePic script in multiple parts, e.g.
Canvas2D & media_id(const std::string &media_id)
JsonValue to_json() const
Convert this object into ScenePic json.
const std::string & media_id() const
The unique ID of the media file associated with this canvas.
double width() const
The width of the canvas.
const Color & background_color() const
The background color of the frame.
std::string to_string() const
Return a JSON string representing the object.
std::shared_ptr< Frame2D > create_frame(const std::string &frame_id="")
Creates a new Frame2D object and appends to the list of Frame2Ds in the Canvas2D.
double height() const
The width of the canvas.
void set_layer_settings(const std::map< std::string, LayerSettings > layer_settings)
Specify the visibilities and opacities of certain mesh layers.
Canvas2D & background_color(const Color &color)
Set the background color of the frame.
Class for representing color values.
Definition: color.h:19
Representation of a JSON value according to the specification at https://www.json....
Definition: json_value.h:30
Top level container representing an entire ScenePic.
Definition: scene.h:58
Definition: audio_track.h:14