Tile-based rendering (partial page invalidation)
This commit is contained in:
@@ -60,6 +60,14 @@ struct DevicePoint {
|
||||
int y;
|
||||
};
|
||||
|
||||
struct InvalidatedRegion {
|
||||
int pageIndex;
|
||||
double x;
|
||||
double y;
|
||||
double width;
|
||||
double height;
|
||||
};
|
||||
|
||||
struct GlyphBounds {
|
||||
std::string text;
|
||||
double x;
|
||||
@@ -172,6 +180,12 @@ public:
|
||||
return std::unexpected(EngineError::Unknown);
|
||||
}
|
||||
|
||||
[[nodiscard]] virtual std::expected<PageImage, EngineError>
|
||||
renderTile(int dpi, double xPt, double yPt, double wPt, double hPt) const {
|
||||
(void)dpi; (void)xPt; (void)yPt; (void)wPt; (void)hPt;
|
||||
return std::unexpected(EngineError::Unknown);
|
||||
}
|
||||
|
||||
[[nodiscard]] virtual std::expected<std::string, EngineError> extractText() const = 0;
|
||||
|
||||
[[nodiscard]] virtual std::expected<std::vector<GlyphBounds>, EngineError> extractTextWithBounds() const = 0;
|
||||
@@ -256,7 +270,8 @@ public:
|
||||
[[nodiscard]] virtual std::expected<std::shared_ptr<fonts::pdf_fonts::Font>, std::string>
|
||||
getResolvedFont(const FontInfo& fontInfo) = 0;
|
||||
|
||||
virtual std::expected<void, EngineError> applyEdits(const std::string& editsJson) = 0;
|
||||
virtual std::expected<std::vector<InvalidatedRegion>, EngineError> applyEdits(const std::string& editsJson) = 0;
|
||||
|
||||
|
||||
[[nodiscard]] virtual std::string lastReflowLayout() const { return {}; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user