pub enum ImagePatch {
Tint(Option<Color>),
Source(ImageSource),
}Expand description
A live change to a realized image or vector glyph.
content_mode and the rest still describe which art this is and how it fills its frame,
which a rebuild expresses better than a patch. Two things do want to follow a signal: the
tint (a glyph that recolors with the selection or the theme should repaint, not be torn
down and realized again, docs/vectors.md “Tint”) and the source, now that it can be a
buffer the app swaps (a download landing, a new photo picked, docs/images.md). Replacing
the pixels of a view that is already on screen is what a patch is for; realizing a second
view would flash.
Variants§
Tint(Option<Color>)
Recolor the glyph, or None to draw the authored colors again.
Source(ImageSource)
Draw different pixels in the same view. A backend that cannot decode the new source
(bytes where Cap::ImageDecode is Unsupported) leaves what it was drawing.
Trait Implementations§
Source§impl Clone for ImagePatch
impl Clone for ImagePatch
Source§fn clone(&self) -> ImagePatch
fn clone(&self) -> ImagePatch
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more