pub fn map<'a, A>(&mut self, x_offset: i32, y_offset: i32, masks: A)
    where
        A: IntoAddrAndArgs<'a, Vec<OscType>> + Sized,
    {
        if self.device_type != MonomeDeviceType::Grid {
            error!("Called grid method on something that is not an grid.");
            return;
        }
        let (frag, mut arg) = masks.as_addr_frag_and_args();

        let mut args = Vec::with_capacity(2 + arg.len());

        args.push(OscType::Int(x_offset));
        args.push(OscType::Int(y_offset));
        args.append(&mut arg);

        self.send(&format!("/grid/led/{}map", frag), args);
    }
/// Set the value an 8x8 quad of led on a monome grid.
///
/// # Arguments
///
/// * `x_offset` - at which offset, that must be a multiple of 8, to set the quad.
/// * `y_offset` - at which offset, that must be a multiple of 8, to set the quad.
/// * `masks` - a vector of 8 unsigned 8-bit integers that is a mask representing the leds to
/// light up, or a vector of 64 bools, true for led On, false for led Off, packed in row order,
/// or a vector of 64 integers between 0 and 15, for the brightness of each led, packed in
/// row order.
///
/// # Example
///
/// On a monome 128, draw a triangle in the lower left half of the rightmost half, and a
/// gradient on the leftmost half.
/// ```no_run
/// # extern crate monome;
/// # use monome::Monome;
/// let mut monome = Monome::new("/prefix").unwrap();
/// let mut v = [0; 64];
/// for i in 0..64 {
///     v[i] = (i / 4) as u8;
/// }
/// monome.map(0, 0, &v);
/// monome.map(8, 0, &[1, 3, 7, 15, 32, 63, 127, 0b11111111]);
/// ```
Set the value an 8x8 quad of led on a monome grid.
Set the value an 8x8 quad of led on a monome grid .
pub fn map<'a, A>(&mut self, x_offset: i32, y_offset: i32, masks: A)
    where
        A: IntoAddrAndArgs<'a, Vec<OscType>> + Sized,
    {
        if self.device_type != MonomeDeviceType::Grid {
            error!("Called grid method on something that is not an grid.");
            return;
        }
        let (frag, mut arg) = masks.as_addr_frag_and_args();
        let mut args = Vec::with_capacity(2 + arg.len());
        args.push(OscType::Int(x_offset));
        args.push(OscType::Int(y_offset));
        args.append(&mut arg);
        self.send(&format!("/grid/led/{}map", frag), args);
    }
pub fn map < ' a , A > ( & mut self , x_offset : i32 , y_offset : i32 , masks : A ) where A : IntoAddrAndArgs < ' a , Vec < OscType > > + Sized , { if self . device_type != MonomeDeviceType :: Grid { error ! ( " " ) ; return ; } let ( frag , mut arg ) = masks . as_addr_frag_and_args ( ) ; let mut args = Vec :: with_capacity ( 2 + arg . len ( ) ) ; args . push ( OscType :: Int ( x_offset ) ) ; args . push ( OscType :: Int ( y_offset ) ) ; args . append ( & mut arg ) ; self . send ( & format ! ( " " frag ) , args ) ; }
Set the value an 8x8 quad of led on a monome grid.
Set the value an 8x8 quad of led on a monome grid .
&mut self
x_offset
i32
y_offset
i32
masks
A
&mut self
x_offset
i32
y_offset
i32
masks
A
example
On a monome 128, draw a triangle in the lower left half of the rightmost half, and a
gradient on the leftmost half.
On a monome 128 draw a triangle in the lower left half of the rightmost half and a gradient on the leftmost half .
extern crate monome;
None
use monome::monome;
None