feat: implemented reflow for bullets and single lines along with the fix for save on delay

This commit is contained in:
Furqan-14
2026-06-17 11:39:01 +05:30
parent c449cf01b9
commit 8f881dfbd5
14 changed files with 289 additions and 134 deletions
+6 -5
View File
@@ -171,15 +171,16 @@ public:
[[nodiscard]] virtual std::expected<PageImage, EngineError> render(int dpi = 96) const = 0;
[[nodiscard]] virtual std::expected<PageImage, EngineError>
renderRegionRaw(int dpi, double yTopPt, double heightPt) const {
(void)dpi; (void)yTopPt; (void)heightPt;
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;
// Adobe-grade hit-testing & selection, layered on extractTextWithBounds().
// Concrete (non-virtual) so every page implementation gets them for free.
// Coordinates are in page-point space (top-left origin), matching GlyphBounds.
// Glyphs in reading order: clustered into lines top-to-bottom, left-to-right.
[[nodiscard]] std::expected<std::vector<GlyphBounds>, EngineError> orderedGlyphs() const;
// Nearest glyph/caret to a point.