BbF

Type Alias BbF 

Source
pub type BbF = BB<TPtF>;

Aliased Type§

pub struct BbF {
    pub x: f64,
    pub y: f64,
    pub w: f64,
    pub h: f64,
}

Fields§

§x: f64§y: f64§w: f64§h: f64

Implementations§

Source§

impl BbF

Source

pub fn translate( self, x_shift: f64, y_shift: f64, shape: ShapeI, oob_mode: OutOfBoundsMode<f64>, ) -> Option<Self>

Source

pub fn follow_movement( &self, from: PtF, to: PtF, shape: ShapeI, oob_mode: OutOfBoundsMode<f64>, ) -> Option<Self>

Source

pub fn new_fit_to_image(x: f64, y: f64, w: f64, h: f64, shape: ShapeI) -> Self

Source

pub fn center_scale( &self, x_factor: f64, y_factor: f64, shape: ShapeI, center: Option<PtF>, ) -> Self

Source

pub fn shift_max( &self, x_shift: f64, y_shift: f64, shape: ShapeI, ) -> Option<Self>

Source

pub fn shift_min( &self, x_shift: f64, y_shift: f64, shape: ShapeI, ) -> Option<Self>

Source

pub fn all_corners_close(&self, other: BbF) -> bool

Trait Implementations§

Source§

impl From<BB<u32>> for BbF

Source§

fn from(box_int: BbI) -> Self

Converts to this type from the input type.