Struct widgetry::screen_geom::ScreenRectangle [−][src]
ScreenRectangle is in units of logical pixels, as opposed to physical pixels.
Fields
x1: f64
y1: f64
x2: f64
y2: f64
Implementations
impl ScreenRectangle
[src]
impl ScreenRectangle
[src]pub fn top_left(top_left: ScreenPt, dims: ScreenDims) -> ScreenRectangle
[src]
pub fn placeholder() -> ScreenRectangle
[src]
pub fn contains(&self, pt: ScreenPt) -> bool
[src]
pub fn pt_to_percent(&self, pt: ScreenPt) -> Option<(f64, f64)>
[src]
pub fn percent_to_pt(&self, x: f64, y: f64) -> ScreenPt
[src]
pub fn width(&self) -> f64
[src]
pub fn height(&self) -> f64
[src]
pub fn dims(&self) -> ScreenDims
[src]
pub fn center(&self) -> ScreenPt
[src]
pub fn to_polygon(&self) -> Polygon
[src]
Trait Implementations
impl Clone for ScreenRectangle
[src]
impl Clone for ScreenRectangle
[src]