pub trait PixelRead: DrawTarget {
// Required method
fn get_pixel(&self, point: Point) -> Self::Color;
}Expand description
Capability trait for draw targets that can read back a pixel they’ve
already written. Optional: the default opacity/blend APIs on
RenderCtx only require DrawTarget and approximate translucency
with ordered dithering, so they keep working on write-only displays.
Implementing PixelRead additionally unlocks the *_true_alpha methods,
which composite against the destination’s actual current contents
instead of dithering.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".