From 00cbe11bdd81529b29b28907bd00b702363db45b Mon Sep 17 00:00:00 2001 From: YK Liu Date: Tue, 1 Sep 2020 20:05:43 +0200 Subject: [PATCH] Update README.md --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 6b19671..52ee58a 100644 --- a/README.md +++ b/README.md @@ -46,8 +46,6 @@ optional arguments: Duration of still comment display [default: 5] ``` - - ### As library Download the code and place it into your project, then import it in your CMakeLists.txt: @@ -102,13 +100,16 @@ void danmaku2ass_example() // Block scolling and top comments ass->setDisallowMode(Danmaku2ASS::DISALLOW_SCROLL | Danmaku2ASS::DISALLOW_TOP); - // Block word - ass->addBlockWord("114514"); + // Block words + std::vector blockWords = {"114514"}; + ass->setBlockWords(blockWords); + + // Reserve 20% of bottom area for subtitles + ass->setReservedArea(0.2); // Save to file std::ofstream outfile("output.ass"); ass->exportAss(outfile); - // Or: ass->exportAssToFile("output.ass"); } } ```