Module checkerboard

Module checkerboard 

Source
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.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§

Checkerboard
W A checkerboard visual.
Colors
Checker board colors.

Functions§

cb_origin
P Sets the offset of the checkerboard pattern.
cb_size
P Set the size of a checkerboard color rectangle.
colors
P Set both checkerboard colors.