pub fn sub_printer<S: Into<Vec2>, T: Into<Vec2>>(
        &'a self, offset: S, size: T, focused: bool
    ) -> Printer<'a> {
        let size = size.into();
        let offset = offset.into().or_min(self.size);
        let available = if !offset.fits_in(self.size) {
            Vec2::zero()
        } else {
            Vec2::min(self.size - offset, size)
        };
        Printer {
            offset: self.offset + offset,
            // We can't be larger than what remains
            size: available,
            focused: self.focused && focused,
            theme: self.theme,
            backend: self.backend,
            new: Rc::clone(&self.new),
        }
    }
/// Returns a printer on a subset of this one's area.
Returns a printer on a subset of this one's area.
Returns a printer on a subset of this one ' s area .
pub fn sub_printer<S: Into<Vec2>, T: Into<Vec2>>(
        &'a self, offset: S, size: T, focused: bool
    ) -> Printer<'a> {
        let size = size.into();
        let offset = offset.into().or_min(self.size);
        let available = if !offset.fits_in(self.size) {
            Vec2::zero()
        } else {
            Vec2::min(self.size - offset, size)
        };
        Printer {
            offset: self.offset + offset,
            // We can't be larger than what remains
            size: available,
            focused: self.focused && focused,
            theme: self.theme,
            backend: self.backend,
            new: Rc::clone(&self.new),
        }
    }
pub fn sub_printer < S : Into < Vec2 > , T : Into < Vec2 > > ( & ' a self , offset : S , size : T , focused : bool ) -> Printer < ' a > { let size = size . into ( ) ; let offset = offset . into ( ) . or_min ( self . size ) ; let available = if ! offset . fits_in ( self . size ) { Vec2 :: zero ( ) } else { Vec2 :: min ( self . size - offset , size ) } ; Printer { offset : self . offset + offset , // We can't be larger than what remains size : available , focused : self . focused && focused , theme : self . theme , backend : self . backend , new : Rc :: clone ( & self . new ) , } }
Returns a printer on a subset of this one's area.
Returns a printer on a subset of this one ' s area .
&'a self
offset
S
size
T
focused
bool
&'a self
offset
S
size
T
focused
bool