zng/
checkerboard.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#![cfg(feature = "checkerboard")]

//! 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::*;
//!
//! # let _scope = APP.defaults();
//! zng::image::IMAGES.limits().modify(|l| {
//!     l.to_mut().allow_uri = zng::image::UriFilter::AllowAll;
//! });
//!
//! # let _ =
//! 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.

pub use zng_wgt_checkerboard::{Checkerboard, Colors, cb_origin, cb_size, colors};