feat(pdf): rebuild editor on vector PdfViewer
Replace the single-page PdfPageView bitmap with a pdfrx PdfViewer: real vector text, continuous scroll, native pinch-zoom (no custom zoom solver, so no zoom-jump here). Ink is glued per-page via pageOverlaysBuilder; the pen is captured at the viewer level by PenCaptureRegion while touch falls through to scroll / pinch / text-select. Add select-text -> highlight via PdfTextSelectionParams: the selection's fragment rects are stored as normalized page rects and drawn under the ink. In-memory only for now. Per-page persistence, undo/redo, tools, colors, thumbnails and pen settings are reused verbatim. analyze clean, 270 tests green.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -56,6 +56,8 @@
|
||||
"back": "Back",
|
||||
"previousPage": "Previous page",
|
||||
"nextPage": "Next page",
|
||||
"toolSelectText": "Select text",
|
||||
"actionHighlightSelection": "Highlight selection",
|
||||
"failedToOpenPdf": "Failed to open PDF:\n{error}",
|
||||
"@failedToOpenPdf": {
|
||||
"placeholders": { "error": { "type": "String" } }
|
||||
|
||||
@@ -380,6 +380,18 @@ abstract class AppLocalizations {
|
||||
/// **'Next page'**
|
||||
String get nextPage;
|
||||
|
||||
/// No description provided for @toolSelectText.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Select text'**
|
||||
String get toolSelectText;
|
||||
|
||||
/// No description provided for @actionHighlightSelection.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Highlight selection'**
|
||||
String get actionHighlightSelection;
|
||||
|
||||
/// No description provided for @failedToOpenPdf.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
|
||||
@@ -155,6 +155,12 @@ class AppLocalizationsEn extends AppLocalizations {
|
||||
@override
|
||||
String get nextPage => 'Next page';
|
||||
|
||||
@override
|
||||
String get toolSelectText => 'Select text';
|
||||
|
||||
@override
|
||||
String get actionHighlightSelection => 'Highlight selection';
|
||||
|
||||
@override
|
||||
String failedToOpenPdf(String error) {
|
||||
return 'Failed to open PDF:\n$error';
|
||||
|
||||
@@ -155,6 +155,12 @@ class AppLocalizationsZh extends AppLocalizations {
|
||||
@override
|
||||
String get nextPage => '下一页';
|
||||
|
||||
@override
|
||||
String get toolSelectText => '选择文字';
|
||||
|
||||
@override
|
||||
String get actionHighlightSelection => '高亮所选';
|
||||
|
||||
@override
|
||||
String failedToOpenPdf(String error) {
|
||||
return '打开 PDF 失败:\n$error';
|
||||
|
||||
@@ -47,6 +47,8 @@
|
||||
"back": "返回",
|
||||
"previousPage": "上一页",
|
||||
"nextPage": "下一页",
|
||||
"toolSelectText": "选择文字",
|
||||
"actionHighlightSelection": "高亮所选",
|
||||
"failedToOpenPdf": "打开 PDF 失败:\n{error}",
|
||||
"pdfNoPages": "PDF 没有任何页面。",
|
||||
"pageOfPages": "{current} / {total}"
|
||||
|
||||
Reference in New Issue
Block a user