MCPcopy Create free account
hub / github.com/TypesettingTools/Aegisub / LoadDefault

Method LoadDefault

src/ass_file.cpp:40–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40void AssFile::LoadDefault(bool include_dialogue_line, std::string const& style_catalog) {
41 Info.emplace_back("Title", "Default Aegisub file");
42 Info.emplace_back("ScriptType", "v4.00+");
43 Info.emplace_back("WrapStyle", "0");
44 Info.emplace_back("ScaledBorderAndShadow", "yes");
45 if (!OPT_GET("Subtitle/Default Resolution/Auto")->GetBool()) {
46 Info.emplace_back("PlayResX", std::to_string(OPT_GET("Subtitle/Default Resolution/Width")->GetInt()));
47 Info.emplace_back("PlayResY", std::to_string(OPT_GET("Subtitle/Default Resolution/Height")->GetInt()));
48 }
49 Info.emplace_back("YCbCr Matrix", "None");
50
51 // Add default style
52 Styles.push_back(*new AssStyle);
53
54 // Add/replace any catalog styles requested
55 if (AssStyleStorage::CatalogExists(style_catalog)) {
56 AssStyleStorage catalog;
57 catalog.LoadCatalog(style_catalog);
58 catalog.ReplaceIntoFile(*this);
59 }
60
61 if (include_dialogue_line)
62 Events.push_back(*new AssDialogue);
63}
64
65AssFile::AssFile(const AssFile &from)
66: Info(from.Info)

Callers 7

CloseMethod · 0.80
ReadFileMethod · 0.80
ReadFileMethod · 0.80
GetSubtitlesMethod · 0.80
ReadFileMethod · 0.80
SubtitlesPreviewMethod · 0.80
ReadFileMethod · 0.80

Calls 3

push_backMethod · 0.80
ReplaceIntoFileMethod · 0.80
LoadCatalogMethod · 0.45

Tested by

no test coverage detected