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
|
|
@ -15,6 +15,7 @@ pub mod linetypes;
|
|||
pub mod patterns;
|
||||
pub mod update_check;
|
||||
pub mod paper_sizes;
|
||||
pub mod thumbnail;
|
||||
|
||||
use crate::scene::DerivedCaches;
|
||||
use acadrust::entities::EntityType;
|
||||
|
|
|
|||
Loading…
Reference in a new issue