Macro droom_ui::pixels
[−]
[src]
macro_rules! pixels { ( $($row:expr),+, ) => { ... }; ( $($row:expr),* ) => { ... }; }
This macro is meant to represent expressively pixels of a image.
It's output should go in the ImageElement::with
constructor.
The output can be also stored in a variable and passed to several image elements.
Example
ImageRgb::with(pixels![ [(255, 0, 0), (255, 0, 0), (255, 0, 0)], [(0, 255, 0), (0, 255, 0), (0, 255, 0)], [(0, 0, 255), (0, 0, 255), (0, 0, 255)], [(0, 0, 255), (0, 0, 255), (0, 0, 255)], [(128, 128, 128), (0, 0, 0), (0, 88, 99)], ])