mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-05 18:19:50 +00:00
Stored the added-image rotation in the direction used by AddedImage.rotation
This commit is contained in:
1 parent
b3b555ff5e
commit
cf336c2ff2
32 files changed
+3586
-3473
No files matched your search
+3378
-3378
File diff suppressed because it is too large.
Load diff
@@ -165,11 +165,7 @@ impl ImageState {
|
||||
|
||||
fn point(&self, x: f64, y: f64) -> Point {
|
||||
let (x, y) = self.placement.matrix.apply(x, y);
|
||||
if x.is_finite() && y.is_finite() {
|
||||
Point::new(x, y)
|
||||
} else {
|
||||
Point::ZERO
|
||||
}
|
||||
if x.is_finite() && y.is_finite() { Point::new(x, y) } else { Point::ZERO }
|
||||
}
|
||||
|
||||
fn apply(&mut self, op: &Op) -> Result<(), EditError> {
|
||||
|
||||
@@ -2581,15 +2581,14 @@ fn run_edit(doc: &mut pdfcraft_cos::Document, edit: &Edit, cx: &mut EditCtx) ->
|
||||
};
|
||||
pdfcraft_edit::change_image(doc, *page, *index, &c)?;
|
||||
if let Some(target_ref) = img.object {
|
||||
let added_items: Vec<(usize, Added)> =
|
||||
pdfcraft_edit::list_added(doc).into_iter().filter(|a| a.page == *page).enumerate().collect();
|
||||
let added_items: Vec<(usize, Added)> = pdfcraft_edit::list_added(doc).into_iter().filter(|a| a.page == *page).enumerate().collect();
|
||||
if let Some((added_idx, added_item)) =
|
||||
added_items.into_iter().find(|(_, a)| matches!(&a.content, AddedContent::Image(ai) if ai.image == target_ref))
|
||||
&& let AddedContent::Image(mut ai) = added_item.content
|
||||
{
|
||||
match change {
|
||||
ImageEdit::Rotate(q) => {
|
||||
let k = q.rem_euclid(4) as u8;
|
||||
let k = ((4 - q.rem_euclid(4)) % 4) as u8;
|
||||
ai.rotation = (ai.rotation + k) % 4;
|
||||
let r = ai.rect;
|
||||
let (cx, cy) = ((r[0] + r[2]) / 2.0, (r[1] + r[3]) / 2.0);
|
||||
@@ -2597,15 +2596,15 @@ fn run_edit(doc: &mut pdfcraft_cos::Document, edit: &Edit, cx: &mut EditCtx) ->
|
||||
let (w, h) = (r[2] - r[0], r[3] - r[1]);
|
||||
ai.rect = [cx - h / 2.0, cy - w / 2.0, cx + h / 2.0, cy + w / 2.0];
|
||||
}
|
||||
let _ = pdfcraft_edit::update_content(doc, *page, added_idx, &AddedContent::Image(ai));
|
||||
pdfcraft_edit::update_content(doc, *page, added_idx, &AddedContent::Image(ai))?;
|
||||
}
|
||||
ImageEdit::Flip { horizontal: true } => {
|
||||
ai.flip_h = !ai.flip_h;
|
||||
let _ = pdfcraft_edit::update_content(doc, *page, added_idx, &AddedContent::Image(ai));
|
||||
pdfcraft_edit::update_content(doc, *page, added_idx, &AddedContent::Image(ai))?;
|
||||
}
|
||||
ImageEdit::Flip { horizontal: false } => {
|
||||
ai.flip_v = !ai.flip_v;
|
||||
let _ = pdfcraft_edit::update_content(doc, *page, added_idx, &AddedContent::Image(ai));
|
||||
pdfcraft_edit::update_content(doc, *page, added_idx, &AddedContent::Image(ai))?;
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ pub fn discover(roots: &[PathBuf]) -> Vec<FontFile> {
|
||||
let mut entries = 0usize;
|
||||
let mut budget = 64u64 << 20;
|
||||
let mut seen = std::collections::HashSet::new();
|
||||
let mut seen_face_content = std::collections::HashSet::new();
|
||||
while let Some((path, depth)) = pending.pop() {
|
||||
if entries >= 4096 || files.len() >= 500 || budget == 0 {
|
||||
break;
|
||||
@@ -70,19 +71,14 @@ pub fn discover(roots: &[PathBuf]) -> Vec<FontFile> {
|
||||
}
|
||||
if let Ok((family, face)) = pdfcraft_fonts::embedding::names(&bytes) {
|
||||
let key = font_content_key(&bytes);
|
||||
files.push((FontFile { path, family, face }, key));
|
||||
if seen_face_content.insert((face.clone(), key)) {
|
||||
files.push(FontFile { path, family, face });
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
files.sort_by(|(a, _), (b, _)| a.face.cmp(&b.face).then(a.path.cmp(&b.path)));
|
||||
let mut seen_face_content = std::collections::HashSet::new();
|
||||
let mut deduped = Vec::new();
|
||||
for (file, key) in files {
|
||||
if seen_face_content.insert((file.face.clone(), key)) {
|
||||
deduped.push(file);
|
||||
}
|
||||
}
|
||||
deduped
|
||||
files.sort_by(|a, b| a.face.cmp(&b.face).then(a.path.cmp(&b.path)));
|
||||
files
|
||||
}
|
||||
|
||||
fn font_content_key(bytes: &[u8]) -> (usize, u64, u64) {
|
||||
|
||||
@@ -1007,15 +1007,15 @@ pub(crate) fn default_page_context_menu(
|
||||
*action = Some(PageMenuAction::Print);
|
||||
ui.close();
|
||||
}
|
||||
if crate::icons::button(ui, "mouse-pointer-2", 24.0, false, "Select Tool").clicked() {
|
||||
if crate::icons::button(ui, "mouse-pointer-2", 24.0, false, tl!("Select Tool")).clicked() {
|
||||
*action = Some(PageMenuAction::SelectTool);
|
||||
ui.close();
|
||||
}
|
||||
if crate::icons::button(ui, "hand", 24.0, false, "Hand Tool").clicked() {
|
||||
if crate::icons::button(ui, "hand", 24.0, false, tl!("Hand Tool")).clicked() {
|
||||
*action = Some(PageMenuAction::HandTool);
|
||||
ui.close();
|
||||
}
|
||||
if crate::icons::button(ui, "zoom-in", 24.0, false, "Marquee Zoom").clicked() {
|
||||
if crate::icons::button(ui, "zoom-in", 24.0, false, tl!("Marquee Zoom")).clicked() {
|
||||
*action = Some(PageMenuAction::MarqueeZoom);
|
||||
ui.close();
|
||||
}
|
||||
@@ -1027,7 +1027,7 @@ pub(crate) fn default_page_context_menu(
|
||||
*action = Some(PageMenuAction::Copy);
|
||||
ui.close();
|
||||
}
|
||||
if ui.add_enabled(can_paste, egui::Button::new("Paste").shortcut_text("Ctrl+V")).clicked() {
|
||||
if ui.add_enabled(can_paste, egui::Button::new(tl!("Paste")).shortcut_text("Ctrl+V")).clicked() {
|
||||
*action = Some(PageMenuAction::Paste(page, at));
|
||||
ui.close();
|
||||
}
|
||||
@@ -1049,7 +1049,7 @@ pub(crate) fn default_page_context_menu(
|
||||
|
||||
ui.separator();
|
||||
|
||||
if ui.add(egui::Button::new(egui::RichText::new("Edit this PDF").strong())).clicked() {
|
||||
if ui.add(egui::Button::new(egui::RichText::new(tl!("Edit this PDF")).strong())).clicked() {
|
||||
*action = Some(PageMenuAction::EditPdf);
|
||||
ui.close();
|
||||
}
|
||||
@@ -1065,14 +1065,14 @@ pub(crate) fn default_page_context_menu(
|
||||
*action = Some(PageMenuAction::DeletePage(page));
|
||||
ui.close();
|
||||
}
|
||||
if ui.button("Export this PDF").clicked() {
|
||||
if ui.button(tl!("Export this PDF")).clicked() {
|
||||
*action = Some(PageMenuAction::ExportPdf);
|
||||
ui.close();
|
||||
}
|
||||
|
||||
ui.separator();
|
||||
|
||||
if ui.button("Find text or tools").clicked() {
|
||||
if ui.button(tl!("Find text or tools")).clicked() {
|
||||
*action = Some(PageMenuAction::Find);
|
||||
ui.close();
|
||||
}
|
||||
@@ -3213,9 +3213,7 @@ pub fn document_area(app: &mut PdfCraftApp, index: usize, ui: &mut egui::Ui) {
|
||||
|| view.goto_point.is_some()
|
||||
|| view.zoom_anchor.is_some()
|
||||
|| view.sync_scroll.is_some()
|
||||
|| (app.quick_tool == QuickTool::Hand
|
||||
&& !middle_gesture
|
||||
&& view.page_widget.is_some_and(|id| ui.ctx().is_being_dragged(id)));
|
||||
|| (app.quick_tool == QuickTool::Hand && !middle_gesture && view.page_widget.is_some_and(|id| ui.ctx().is_being_dragged(id)));
|
||||
scroll = scroll.animated(view.continuous && animates && !has_jump);
|
||||
// A newly opened document starts at the top. eframe saves egui's memory with the settings
|
||||
// and document ids start again at 1 every launch, so the offset stored under this id can be
|
||||
@@ -3456,7 +3454,7 @@ pub fn document_area(app: &mut PdfCraftApp, index: usize, ui: &mut egui::Ui) {
|
||||
if let Some(p) = pointer_pos {
|
||||
for (page_idx, xf) in &view.screen_xforms {
|
||||
let images = doc.page_images(*page_idx);
|
||||
for (idx, img) in images.iter().enumerate() {
|
||||
for (idx, img) in images.iter().enumerate().rev() {
|
||||
let obb = ImageObb::from_image(img, xf, info, *page_idx);
|
||||
let b = image_screen_rect(img, xf, info, *page_idx);
|
||||
if (b.is_positive() && b.contains(p)) || crate::edit_text_ui::quad_contains(obb.corners(), p) {
|
||||
@@ -4753,7 +4751,8 @@ pub fn document_area(app: &mut PdfCraftApp, index: usize, ui: &mut egui::Ui) {
|
||||
app.paste_image_at(page, at);
|
||||
}
|
||||
Some(PageMenuAction::RotateCCW(page)) => {
|
||||
app.views[index].pending_edit = Some(pdfcraft_engine::Edit::RotatePages { pages: vec![page], degrees: -90 });
|
||||
let _ = page;
|
||||
app.views[index].rotate_view(false);
|
||||
}
|
||||
Some(PageMenuAction::RotateCW(page)) => {
|
||||
let _ = page;
|
||||
|
||||
@@ -331,8 +331,7 @@ pub(crate) fn page_input(
|
||||
if resp.drag_stopped() || !ui.input(|i| i.pointer.primary_down()) {
|
||||
cv.grab = None;
|
||||
let end = pointer.unwrap_or(start);
|
||||
let items: Vec<(usize, &Added)> =
|
||||
on_page(added, page).into_iter().filter(|(_, a)| matches!(a.content, AddedContent::Text(_))).collect();
|
||||
let items: Vec<(usize, &Added)> = on_page(added, page).into_iter().filter(|(_, a)| matches!(a.content, AddedContent::Text(_))).collect();
|
||||
if let Some((sp, si)) = cv.selected
|
||||
&& sp == page
|
||||
&& let Some((_, a)) = items.iter().find(|(i, _)| *i == si)
|
||||
@@ -353,8 +352,7 @@ pub(crate) fn page_input(
|
||||
return consumed;
|
||||
}
|
||||
let Some(p) = pointer.filter(|p| xf.rect.contains(*p)) else { return consumed };
|
||||
let items: Vec<(usize, &Added)> =
|
||||
on_page(added, page).into_iter().filter(|(_, a)| matches!(a.content, AddedContent::Text(_))).collect();
|
||||
let items: Vec<(usize, &Added)> = on_page(added, page).into_iter().filter(|(_, a)| matches!(a.content, AddedContent::Text(_))).collect();
|
||||
let hit = items.iter().rev().find(|(_, a)| screen_rect(xf, info, page, a.content.rect()).expand(2.0).contains(p)).map(|(i, a)| (*i, *a));
|
||||
let selected_rect = cv
|
||||
.selected
|
||||
|
||||
@@ -49,10 +49,7 @@ impl PdfCraftApp {
|
||||
let target = doc.and_then(|d| d.page_images(*page).get(*index).cloned());
|
||||
let ambiguous = doc.is_some_and(|d| {
|
||||
if let Some(t) = &target {
|
||||
d.page_images(*page)
|
||||
.iter()
|
||||
.filter(|img| img.name == t.name && img.object == t.object && img.rect == t.rect)
|
||||
.count() > 1
|
||||
d.page_images(*page).iter().filter(|img| img.name == t.name && img.object == t.object && img.rect == t.rect).count() > 1
|
||||
} else {
|
||||
false
|
||||
}
|
||||
@@ -203,17 +200,9 @@ impl PdfCraftApp {
|
||||
if name_obj_matches.len() == 1 {
|
||||
Some(name_obj_matches[0])
|
||||
} else if name_obj_matches.is_empty() {
|
||||
let name_matches: Vec<usize> = page_images
|
||||
.iter()
|
||||
.enumerate()
|
||||
.filter(|(_, img)| img.name == target.name)
|
||||
.map(|(idx, _)| idx)
|
||||
.collect();
|
||||
if name_matches.len() == 1 {
|
||||
Some(name_matches[0])
|
||||
} else {
|
||||
None
|
||||
}
|
||||
let name_matches: Vec<usize> =
|
||||
page_images.iter().enumerate().filter(|(_, img)| img.name == target.name).map(|(idx, _)| idx).collect();
|
||||
if name_matches.len() == 1 { Some(name_matches[0]) } else { None }
|
||||
} else {
|
||||
None
|
||||
}
|
||||
|
||||
@@ -2723,4 +2723,10 @@ certificate Version الإصدار
|
||||
Select tools to display on your Home page for quick access. حدد الأدوات المراد عرضها على صفحتك الرئيسية للوصول السريع.
|
||||
Unpin from Home إلغاء التثبيت من الصفحة الرئيسية
|
||||
Unpin tool إلغاء تثبيت الأداة
|
||||
Transform image تحويل الصورة
|
||||
Transform image تحويل الصورة
|
||||
Select Tool أداة التحديد
|
||||
Hand Tool أداة اليد
|
||||
Marquee Zoom تكبير بالتحديد
|
||||
Edit this PDF تحرير هذا الملف PDF
|
||||
Export this PDF تصدير هذا الملف PDF
|
||||
Find text or tools البحث عن نص أو أدوات
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 47.
|
@@ -2409,4 +2409,11 @@ animation effects Off Изключени
|
||||
Select tools to display on your Home page for quick access. Изберете инструменти за показване на началната страница за бърз достъп.
|
||||
Unpin from Home Откачане от Начало
|
||||
Unpin tool Откачане на инструмент
|
||||
Transform image Трансформиране на изображение
|
||||
Transform image Трансформиране на изображение
|
||||
Select Tool Инструмент за избор
|
||||
Hand Tool Инструмент „Ръка“
|
||||
Marquee Zoom Мащабиране с рамка
|
||||
Paste Постави
|
||||
Edit this PDF Редактирай този PDF
|
||||
Export this PDF Експортирай този PDF
|
||||
Find text or tools Търсене на текст или инструменти
|
||||
|
Can't render this file because it contains an unexpected character in line 8 and column 16.
|
@@ -2520,4 +2520,11 @@ animation effects Off Vypnuto
|
||||
Select tools to display on your Home page for quick access. Vyberte nástroje, které se mají zobrazovat na domovské stránce pro rychlý přístup.
|
||||
Unpin from Home Odepnout z domovské stránky
|
||||
Unpin tool Odepnout nástroj
|
||||
Transform image Transformovat obrázek
|
||||
Transform image Transformovat obrázek
|
||||
Select Tool Nástroj pro výběr
|
||||
Hand Tool Nástroj ručička
|
||||
Marquee Zoom Zvětšit vybranou oblast
|
||||
Paste Vložit
|
||||
Edit this PDF Upravit toto PDF
|
||||
Export this PDF Exportovat toto PDF
|
||||
Find text or tools Hledat text nebo nástroje
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 47.
|
@@ -2447,4 +2447,11 @@ animation effects Off Aus
|
||||
Select tools to display on your Home page for quick access. Wählen Sie Werkzeuge für den Schnellzugriff auf Ihrer Startseite aus.
|
||||
Unpin from Home Von Start lösen
|
||||
Unpin tool Werkzeug lösen
|
||||
Transform image Bild transformieren
|
||||
Transform image Bild transformieren
|
||||
Select Tool Auswahl-Werkzeug
|
||||
Hand Tool Hand-Werkzeug
|
||||
Marquee Zoom Auswahlrahmen-Zoom
|
||||
Paste Einfügen
|
||||
Edit this PDF Dieses PDF bearbeiten
|
||||
Export this PDF Dieses PDF exportieren
|
||||
Find text or tools Text oder Werkzeuge suchen
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 51.
|
@@ -2452,4 +2452,11 @@ animation effects Off Ανενεργά
|
||||
Select tools to display on your Home page for quick access. Επιλέξτε εργαλεία για εμφάνιση στην Αρχική σας για γρήγορη πρόσβαση.
|
||||
Unpin from Home Ξεκαρφίτσωμα από την Αρχική
|
||||
Unpin tool Ξεκαρφίτσωμα εργαλείου
|
||||
Transform image Μετασχηματισμός εικόνας
|
||||
Transform image Μετασχηματισμός εικόνας
|
||||
Select Tool Εργαλείο επιλογής
|
||||
Hand Tool Εργαλείο χεριού
|
||||
Marquee Zoom Μεγέθυνση επιλεγμένης περιοχής
|
||||
Paste Επικόλληση
|
||||
Edit this PDF Επεξεργασία αυτού του PDF
|
||||
Export this PDF Εξαγωγή αυτού του PDF
|
||||
Find text or tools Εύρεση κειμένου ή εργαλείων
|
||||
|
Can't render this file because it contains an unexpected character in line 477 and column 9.
|
@@ -2593,3 +2593,10 @@ animation effects Off Desactivados
|
||||
Select tools to display on your Home page for quick access. Selecciona las herramientas que se mostrarán en la página de Inicio para un acceso rápido.
|
||||
Unpin from Home Desanclar de Inicio
|
||||
Unpin tool Desanclar herramienta
|
||||
Select Tool Herramienta Selección
|
||||
Hand Tool Herramienta Mano
|
||||
Marquee Zoom Zoom por selección
|
||||
Paste Pegar
|
||||
Edit this PDF Editar este PDF
|
||||
Export this PDF Exportar este PDF
|
||||
Find text or tools Buscar texto o herramientas
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 60.
|
@@ -2446,4 +2446,11 @@ animation effects Off Désactivés
|
||||
Select tools to display on your Home page for quick access. Sélectionnez les outils à afficher sur votre page d'Accueil pour un accès rapide.
|
||||
Unpin from Home Désépingler de l'Accueil
|
||||
Unpin tool Désépingler l'outil
|
||||
Transform image Transformer l'image
|
||||
Transform image Transformer l'image
|
||||
Select Tool Outil Sélection
|
||||
Hand Tool Outil Main
|
||||
Marquee Zoom Zoom par sélection
|
||||
Paste Coller
|
||||
Edit this PDF Modifier ce PDF
|
||||
Export this PDF Exporter ce PDF
|
||||
Find text or tools Rechercher du texte ou des outils
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 39.
|
@@ -2445,4 +2445,11 @@ animation effects Off Ki
|
||||
Select tools to display on your Home page for quick access. Válassza ki a Kezdőlapon megjelenítendő eszközöket a gyors eléréshez.
|
||||
Unpin from Home Rögzítés feloldása a Kezdőlapról
|
||||
Unpin tool Eszköz rögzítésének feloldása
|
||||
Transform image Kép transzformálása
|
||||
Transform image Kép transzformálása
|
||||
Select Tool Kijelölő eszköz
|
||||
Hand Tool Kéz eszköz
|
||||
Marquee Zoom Kijelölő nagyítás
|
||||
Paste Beillesztés
|
||||
Edit this PDF Ezen PDF szerkesztése
|
||||
Export this PDF Ezen PDF exportálása
|
||||
Find text or tools Szöveg vagy eszközök keresése
|
||||
|
Can't render this file because it contains an unexpected character in line 7 and column 44.
|
@@ -2658,4 +2658,11 @@ certificate SHA-256 digest Impronta SHA-256
|
||||
Select tools to display on your Home page for quick access. Seleziona gli strumenti da visualizzare nella pagina Home per un acceso rapido.
|
||||
Unpin from Home Rimuovi da Home
|
||||
Unpin tool Rimuovi strumento
|
||||
Transform image Trasforma immagine
|
||||
Transform image Trasforma immagine
|
||||
Select Tool Strumento Selezione
|
||||
Hand Tool Strumento Mano
|
||||
Marquee Zoom Ingrandimento selettivo
|
||||
Paste Incolla
|
||||
Edit this PDF Modifica questo PDF
|
||||
Export this PDF Esporta questo PDF
|
||||
Find text or tools Trova testo o strumenti
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 47.
|
@@ -2446,4 +2446,11 @@ animation effects Off オフ
|
||||
Select tools to display on your Home page for quick access. すばやくアクセスできるように、ホームに表示するツールを選択します。
|
||||
Unpin from Home ホームからピン留めを解除
|
||||
Unpin tool ツールのピン留めを解除
|
||||
Transform image 画像を変換
|
||||
Transform image 画像を変換
|
||||
Select Tool 選択ツール
|
||||
Hand Tool 手のひらツール
|
||||
Marquee Zoom 範囲指定ズーム
|
||||
Paste 貼り付け
|
||||
Edit this PDF この PDF を編集
|
||||
Export this PDF この PDF を書き出す
|
||||
Find text or tools テキストまたはツールを検索
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 47.
|
@@ -2444,4 +2444,11 @@ animation effects Off Өшірулі
|
||||
Select tools to display on your Home page for quick access. Жылдам қол жеткізу үшін басты бетте көрсетілетін құралдарды таңдаңыз.
|
||||
Unpin from Home Басты беттен алып тастау
|
||||
Unpin tool Құралды алып тастау
|
||||
Transform image Кескінді түрлендіру
|
||||
Transform image Кескінді түрлендіру
|
||||
Select Tool Таңдау құралы
|
||||
Hand Tool Қол құралы
|
||||
Marquee Zoom Аймақты масштабтау
|
||||
Paste Қою
|
||||
Edit this PDF Осы PDF файлын түзету
|
||||
Export this PDF Осы PDF файлын экспорттау
|
||||
Find text or tools Мәтінді немесе құралдарды табу
|
||||
|
Can't render this file because it contains an unexpected character in line 826 and column 9.
|
@@ -2698,4 +2698,10 @@ theme Appearance Išvaizda
|
||||
Select tools to display on your Home page for quick access. Pasirinkite įrankius, kuriuos norite rodyti pradžios puslapyje.
|
||||
Unpin from Home Atsegti nuo pradžios
|
||||
Unpin tool Atsegti įrankį
|
||||
Transform image Transformuoti paveikslėlį
|
||||
Transform image Transformuoti paveikslėlį
|
||||
Select Tool Pasirinkimo įrankis
|
||||
Hand Tool Rankos įrankis
|
||||
Marquee Zoom Didinti pažymėtą sritį
|
||||
Edit this PDF Redaguoti šį PDF
|
||||
Export this PDF Eksportuoti šį PDF
|
||||
Find text or tools Rasti tekstą arba įrankius
|
||||
|
Can't render this file because it contains an unexpected character in line 404 and column 9.
|
@@ -2422,4 +2422,11 @@ animation effects Off Wyłączone
|
||||
Select tools to display on your Home page for quick access. Wybierz narzędzia do wyświetlenia na stronie głównej, aby mieć do nich szybki dostęp.
|
||||
Unpin from Home Odepnij od strony głównej
|
||||
Unpin tool Odepnij narzędzie
|
||||
Transform image Przekształć obraz
|
||||
Transform image Przekształć obraz
|
||||
Select Tool Narzędzie Zaznaczanie
|
||||
Hand Tool Narzędzie Rączka
|
||||
Marquee Zoom Powiększ zaznaczony obszar
|
||||
Paste Wklej
|
||||
Edit this PDF Edytuj ten plik PDF
|
||||
Export this PDF Eksportuj ten plik PDF
|
||||
Find text or tools Znajdź tekst lub narzędzia
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 47.
|
@@ -2460,4 +2460,11 @@ animation effects Off Desativados
|
||||
Select tools to display on your Home page for quick access. Selecione ferramentas para exibir na página Início para acesso rápido.
|
||||
Unpin from Home Desafixar do Início
|
||||
Unpin tool Desafixar ferramenta
|
||||
Transform image Transformar imagem
|
||||
Transform image Transformar imagem
|
||||
Select Tool Ferramenta Seleção
|
||||
Hand Tool Ferramenta Mão
|
||||
Marquee Zoom Zoom por seleção
|
||||
Paste Colar
|
||||
Edit this PDF Editar este PDF
|
||||
Export this PDF Exportar este PDF
|
||||
Find text or tools Localizar texto ou ferramentas
|
||||
|
Can't render this file because it contains an unexpected character in line 9 and column 16.
|
@@ -2359,4 +2359,11 @@ animation effects Off Выкл
|
||||
Select tools to display on your Home page for quick access. Выберите инструменты для отображения на Главной странице для быстрого доступа.
|
||||
Unpin from Home Открепить от Главной
|
||||
Unpin tool Открепить инструмент
|
||||
Transform image Трансформировать изображение
|
||||
Transform image Трансформировать изображение
|
||||
Select Tool Инструмент «Выделение»
|
||||
Hand Tool Инструмент «Рука»
|
||||
Marquee Zoom Масштаб выделением
|
||||
Paste Вставить
|
||||
Edit this PDF Редактировать этот PDF
|
||||
Export this PDF Экспортировать этот PDF
|
||||
Find text or tools Найти текст или инструменты
|
||||
|
Can't render this file because it contains an unexpected character in line 9 and column 16.
|
@@ -2451,4 +2451,11 @@ animation effects Off Izklopljeni
|
||||
Select tools to display on your Home page for quick access. Izberite orodja za prikaz na domači strani za hiter dostop.
|
||||
Unpin from Home Odpni z domače strani
|
||||
Unpin tool Odpni orodje
|
||||
Transform image Preoblikuj sliko
|
||||
Transform image Preoblikuj sliko
|
||||
Select Tool Orodje za izbiro
|
||||
Hand Tool Orodje z roko
|
||||
Marquee Zoom Povečava z okvirjem
|
||||
Paste Prilepi
|
||||
Edit this PDF Uredi ta PDF
|
||||
Export this PDF Izvozi ta PDF
|
||||
Find text or tools Poišči besedilo ali orodja
|
||||
|
Can't render this file because it contains an unexpected character in line 9 and column 16.
|
@@ -2355,4 +2355,11 @@ animation effects Off ఆఫ్
|
||||
Select tools to display on your Home page for quick access. త్వరిత ప్రాప్యత కోసం మీ హోమ్ పేజీలో ప్రదర్శించడానికి సాధనాలను ఎంచుకోండి.
|
||||
Unpin from Home హోమ్ నుండి అన్పిన్ చేయి
|
||||
Unpin tool సాధనాన్ని అన్పిన్ చేయి
|
||||
Transform image చిత్రాన్ని రూపాంతరం చేయండి
|
||||
Transform image చిత్రాన్ని రూపాంతరం చేయండి
|
||||
Select Tool ఎంపిక సాధనం
|
||||
Hand Tool హ్యాండ్ సాధనం
|
||||
Marquee Zoom ఎంచుకున్న ప్రాంతానికి జూమ్
|
||||
Paste అతికించు
|
||||
Edit this PDF ఈ PDFను సవరించు
|
||||
Export this PDF ఈ PDFను ఎగుమти చేయి
|
||||
Find text or tools వచనం లేదా సాధనాలను కనుగొనండి
|
||||
|
Can't render this file because it contains an unexpected character in line 13 and column 16.
|
@@ -2442,4 +2442,11 @@ animation effects Off Kapalı
|
||||
Select tools to display on your Home page for quick access. Hızlı erişim için Giriş sayfanızda görüntülenecek araçları seçin.
|
||||
Unpin from Home Giriş'ten sabitlemeyi kaldır
|
||||
Unpin tool Aracın sabitlemesini kaldır
|
||||
Transform image Görüntüyü dönüştür
|
||||
Transform image Görüntüyü dönüştür
|
||||
Select Tool Seçim Aracı
|
||||
Hand Tool El Aracı
|
||||
Marquee Zoom Seçim yakınlaştırma
|
||||
Paste Yapıştır
|
||||
Edit this PDF Bu PDF'i düzenle
|
||||
Export this PDF Bu PDF'i dışa aktar
|
||||
Find text or tools Metin veya araç bul
|
||||
|
Can't render this file because it contains an unexpected character in line 825 and column 9.
|
@@ -2468,4 +2468,11 @@ animation effects Off Вимкнено
|
||||
Select tools to display on your Home page for quick access. Виберіть інструменти для відображення на Головній для швидкого доступу.
|
||||
Unpin from Home Відкріпити від Головної
|
||||
Unpin tool Відкріпити інструмент
|
||||
Transform image Трансформувати зображення
|
||||
Transform image Трансформувати зображення
|
||||
Select Tool Інструмент виділення
|
||||
Hand Tool Інструмент «Рука»
|
||||
Marquee Zoom Масштабувати виділену область
|
||||
Paste Вставити
|
||||
Edit this PDF Редактировать цей PDF
|
||||
Export this PDF Експортувати цей PDF
|
||||
Find text or tools Знайти текст або інструменти
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 47.
|
@@ -2703,4 +2703,10 @@ key Space Space
|
||||
Select tools to display on your Home page for quick access. Chọn các công cụ hiển thị trên Trang chủ để truy cập nhanh.
|
||||
Unpin from Home Bỏ ghim khỏi Trang chủ
|
||||
Unpin tool Bỏ ghim công cụ
|
||||
Transform image Chuyển đổi hình ảnh
|
||||
Transform image Chuyển đổi hình ảnh
|
||||
Select Tool Công cụ chọn
|
||||
Hand Tool Công cụ bàn tay
|
||||
Marquee Zoom Thu phóng theo vùng chọn
|
||||
Edit this PDF Chỉnh sửa PDF này
|
||||
Export this PDF Xuất PDF này
|
||||
Find text or tools Tìm văn bản hoặc công cụ
|
||||
|
Can't render this file because it contains an unexpected character in line 491 and column 12.
|
@@ -2410,4 +2410,11 @@ animation effects Off 关
|
||||
Select tools to display on your Home page for quick access. 选择要在主页上显示的工具以便快速访问。
|
||||
Unpin from Home 从主页取消固定
|
||||
Unpin tool 取消固定工具
|
||||
Transform image 变换图像
|
||||
Transform image 变换图像
|
||||
Select Tool 选择工具
|
||||
Hand Tool 手形工具
|
||||
Marquee Zoom 选框缩放
|
||||
Paste 粘贴
|
||||
Edit this PDF 编辑此 PDF
|
||||
Export this PDF 导出此 PDF
|
||||
Find text or tools 查找文本或工具
|
||||
|
Can't render this file because it contains an unexpected character in line 9 and column 16.
|
@@ -2396,4 +2396,11 @@ animation effects Off 關
|
||||
Select tools to display on your Home page for quick access. 選取要在首頁上顯示的工具以便快速存取。
|
||||
Unpin from Home 從首頁取消釘選
|
||||
Unpin tool 取消釘選工具
|
||||
Transform image 變換影像
|
||||
Transform image 變換影像
|
||||
Select Tool 選取工具
|
||||
Hand Tool 手形工具
|
||||
Marquee Zoom 選取範圍縮放
|
||||
Paste 貼上
|
||||
Edit this PDF 編輯此 PDF
|
||||
Export this PDF 匯出此 PDF
|
||||
Find text or tools 尋找文字或工具
|
||||
|
Can't render this file because it contains an unexpected character in line 9 and column 16.
|
@@ -701,7 +701,7 @@ mod tests {
|
||||
if is_corner {
|
||||
let orig_ratio = w / h;
|
||||
let new_ratio = res.width() / res.height();
|
||||
prop_assert!((orig_ratio - new_ratio).abs() < 1e-3, "orig: {orig_ratio}, new: {new_ratio}");
|
||||
prop_assert!((orig_ratio - new_ratio).abs() <= 1e-3 * orig_ratio.max(1.0), "orig: {orig_ratio}, new: {new_ratio}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -275,7 +275,7 @@ fn typing_moving_styling_and_deleting_added_content() {
|
||||
h.run_steps(3);
|
||||
let a = added(&h);
|
||||
let pdfcraft_engine::AddedContent::Image(img) = &a[0].content else { panic!() };
|
||||
assert_eq!((img.rotation, img.rect), (1, [140.0, 185.0, 160.0, 215.0]));
|
||||
assert_eq!((img.rotation, img.rect), (3, [140.0, 185.0, 160.0, 215.0]));
|
||||
|
||||
h.hover_at(c);
|
||||
h.run_steps(1);
|
||||
|
||||
@@ -5704,14 +5704,8 @@ fn arrange_duplicate_image_clears_selection_when_ambiguous() {
|
||||
assert_eq!(images[0].name, images[1].name);
|
||||
|
||||
// Select the second occurrence (index 1)
|
||||
h.state_mut().views[0].image_selection = Some(pdfcraft_ui_egui::edit_text_ui::ImageSelection {
|
||||
page: 0,
|
||||
index: 1,
|
||||
drag: None,
|
||||
crop: None,
|
||||
crop_mode: false,
|
||||
crop_rect: None,
|
||||
});
|
||||
h.state_mut().views[0].image_selection =
|
||||
Some(pdfcraft_ui_egui::edit_text_ui::ImageSelection { page: 0, index: 1, drag: None, crop: None, crop_mode: false, crop_rect: None });
|
||||
h.run_steps(2);
|
||||
|
||||
// Arrange send to back
|
||||
@@ -5725,10 +5719,7 @@ fn arrange_duplicate_image_clears_selection_when_ambiguous() {
|
||||
|
||||
// Because there are duplicate occurrences matching name, object, and rect,
|
||||
// selection must be cleared rather than picking an arbitrary occurrence.
|
||||
assert!(
|
||||
h.state().views[0].image_selection.is_none(),
|
||||
"selection is safely cleared when reordering ambiguous duplicate images"
|
||||
);
|
||||
assert!(h.state().views[0].image_selection.is_none(), "selection is safely cleared when reordering ambiguous duplicate images");
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -5771,14 +5762,8 @@ fn arrange_unique_image_preserves_selection() {
|
||||
assert_eq!(images[1].name, "FigB");
|
||||
|
||||
// Select FigA at index 0 and bring it to front (should move after FigB, becoming index 1)
|
||||
h.state_mut().views[0].image_selection = Some(pdfcraft_ui_egui::edit_text_ui::ImageSelection {
|
||||
page: 0,
|
||||
index: 0,
|
||||
drag: None,
|
||||
crop: None,
|
||||
crop_mode: false,
|
||||
crop_rect: None,
|
||||
});
|
||||
h.state_mut().views[0].image_selection =
|
||||
Some(pdfcraft_ui_egui::edit_text_ui::ImageSelection { page: 0, index: 0, drag: None, crop: None, crop_mode: false, crop_rect: None });
|
||||
h.run_steps(2);
|
||||
|
||||
let applied = h.state_mut().apply_edit(pdfcraft_engine::Edit::EditPageImage {
|
||||
|
||||
Reference in new issue
Block a user