Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
coslyk committed Sep 1, 2020
1 parent 08b878a commit 00cbe11
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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<std::string> 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");
}
}
```
Expand Down

0 comments on commit 00cbe11

Please sign in to comment.