Raster images: transparency off draws pixels opaque; TRANSPARENCY command

An image's transparency flag decides whether transparent pixels show what
is behind the image or draw in their stored colour: the image pass and PDF
plots now follow it (it was ignored, so every PNG alpha showed through).
TRANSPARENCY selects images and asks for the mode, defaulting to the first
image's current one.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
ramox81andClaude Opus 5.5 committed 2026-09-28 11:23:19 +03:00
1 parent 801882314f
commit 5ca7becd97
30 files changed
+237 -6

No files matched your search

+8
View File
@@ -94,6 +94,9 @@ pub struct ImageModel {
/// Magnified pixels stay square (raster images); otherwise they blend
/// (PDF pages, OLE pictures).
pub pixelated: bool,
/// Pixel alpha applies. A raster image whose transparency is off draws
/// every pixel opaque in its stored colour.
pub use_alpha: bool,
}
impl ImageModel {
@@ -165,6 +168,9 @@ impl ImageModel {
draw_depth: 0.0,
verts,
pixelated: true,
use_alpha: img
.flags
.contains(codec::entities::ImageDisplayFlags::TRANSPARENCY_ON),
})
}
}
@@ -274,6 +280,7 @@ impl ImageModel {
draw_depth: 0.0,
verts,
pixelated: false,
use_alpha: true,
})
}
}
@@ -355,6 +362,7 @@ impl ImageModel {
draw_depth: 0.0,
verts,
pixelated: false,
use_alpha: true,
})
}
}