Expand description
Checkerboard visual widget.
The widget appearance can be configured on it or in any parent widget, by default it looks like the transparency checkerboard.
use zng::prelude::*;
zng::image::IMAGES.limits().modify(|l| {
l.to_mut().allow_uri = zng::image::UriFilter::AllowAll;
});
Image! {
widget::background = zng::checkerboard::Checkerboard!();
source = "https://upload.wikimedia.org/wikipedia/commons/4/47/PNG_transparency_demonstration_1.png";
}
§Full API
See zng_wgt_checkerboard
for the full widget API.
Structs§
W
A checkerboard visual.- Checker board colors.
Functions§
P
Sets the offset of the checkerboard pattern.P
Set the size of a checkerboard color rectangle.P
Set both checkerboard colors.