feat(thumbnail): embed a DWG preview on save, show it on the Start page
Generate a small wire-raster thumbnail when saving a DWG and embed it via acadrust's preview API, so OCS drawings show a thumbnail in file browsers and other CAD applications. Read the embedded preview back cheaply (file header + preview bytes only, no full parse) to show a thumbnail per file in the Start page's Recent Documents panel. - io/thumbnail.rs: CPU rasterizer (current-layout wires -> BMP DIB) plus a preview-only reader/decoder (BMP/PNG -> iced handle) for the Start page. - Embedded on save via stamp_thumbnail on both save paths. - recent_thumbs cache filled on config load / recents change (never from a view); a thumbnail is drawn beside each recent file. Requires acadrust at 3111694 (preview read/write), already pinned in Cargo.lock. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
d38fcda07c
commit
5c4ba97c5f
7 changed files with 326 additions and 10 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
|
@ -72,7 +72,7 @@ checksum = "366ffbaa4442f4684d91e2cd7c5ea7c4ed8add41959a31447066e279e432b618"
|
|||
[[package]]
|
||||
name = "acadrust"
|
||||
version = "0.4.0"
|
||||
source = "git+https://github.com/HakanSeven12/acadrust?branch=main#716d4b41c99e9540deb1fe009223d09b82fdfca9"
|
||||
source = "git+https://github.com/HakanSeven12/acadrust?branch=main#3111694c734bf6d86f1c3693e98657733070a277"
|
||||
dependencies = [
|
||||
"ahash 0.8.12",
|
||||
"anyhow",
|
||||
|
|
|
|||
Loading…
Reference in a new issue