MCPcopy Create free account
hub / github.com/crosspoint-reader/crosspoint-reader / onPageComplete

Method onPageComplete

lib/Epub/Epub/Section.cpp:27–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25} // namespace
26
27uint32_t Section::onPageComplete(std::unique_ptr<Page> page) {
28 if (!file) {
29 LOG_ERR("SCT", "File not open for writing page %d", pageCount);
30 return 0;
31 }
32
33 const uint32_t position = file.position();
34 if (!page->serialize(file)) {
35 LOG_ERR("SCT", "Failed to serialize page %d", pageCount);
36 return 0;
37 }
38 LOG_DBG("SCT", "Page %d processed", pageCount);
39
40 pageCount++;
41 return position;
42}
43
44void Section::writeSectionFileHeader(const int fontId, const float lineCompression, const bool extraParagraphSpacing,
45 const uint8_t paragraphAlignment, const uint16_t viewportWidth,

Callers 1

createSectionFileMethod · 0.95

Calls 2

positionMethod · 0.80
serializeMethod · 0.45

Tested by

no test coverage detected