mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2026-02-04 22:57:50 +03:00
Enhance Xtc class with page and chapter methods
Add methods for loading page batches and retrieving chapter information.
This commit is contained in:
parent
da4d3b5ea5
commit
24afc3be03
@ -73,6 +73,43 @@ class Xtc {
|
||||
uint16_t getPageHeight() const;
|
||||
uint8_t getBitDepth() const; // 1 = XTC (1-bit), 2 = XTCH (2-bit)
|
||||
|
||||
/**
|
||||
* 动态加载下一批页码
|
||||
*/
|
||||
xtc::XtcError loadNextPageBatch() const {
|
||||
return parser ? parser->loadNextPageBatch() : xtc::XtcError::FILE_NOT_FOUND;
|
||||
}
|
||||
|
||||
xtc::XtcError loadPageBatchByStart(uint16_t startPage) const {
|
||||
return parser ? parser->loadPageBatchByStart(startPage): xtc::XtcError::FILE_NOT_FOUND;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前已加载的最大页码
|
||||
*/
|
||||
uint16_t getLoadedMaxPage() const {
|
||||
return parser ? parser->getLoadedMaxPage() : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取每次加载的批次页数
|
||||
*/
|
||||
uint16_t getPageBatchSize() const {
|
||||
return parser ? parser->getPageBatchSize() : 10;
|
||||
}
|
||||
xtc::XtcError readChapters_gd(uint16_t chapterStart) const {
|
||||
return parser ? parser->readChapters_gd(chapterStart) : xtc::XtcError::FILE_NOT_FOUND;
|
||||
}
|
||||
uint32_t getChapterstartpage(int chapterIndex) {
|
||||
return parser ? parser->getChapterstartpage(chapterIndex) : 0;
|
||||
}
|
||||
std::string getChapterTitleByIndex(int chapterIndex) {
|
||||
return parser ? parser->getChapterTitleByIndex(chapterIndex) : "";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Load page bitmap data
|
||||
* @param pageIndex Page index (0-based)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user