Searched refs:relative_to_width (Results 1 – 2 of 2) sorted by relevance
260 pub fn relative_to_width(&self, p: f64) -> f64 { in relative_to_width() method776 assert_eq!(102.4, drawing_area.relative_to_width(0.1)); in test_relative_size()779 assert_eq!(1024.0, drawing_area.relative_to_width(1.3)); in test_relative_size()782 assert_eq!(0.0, drawing_area.relative_to_width(-0.2)); in test_relative_size()
213 …ve sizing by added function `DrawingArea::relative_to_height` and `DrawingArea::relative_to_width`.