Struct pixel_widgets::layout::Rectangle [−][src]
Expand description
A rectangle
Fields
left: f32top: f32right: f32bottom: f32Implementations
Convert a rectangle to device coordinates ([-1.0, 1.0]) using a Viewport.
(-1, -1) is the top left corner (0, 0), where (1, 1) is the bottom right
corner (viewport.width(), viewport.height()).
Construct a new rectangle with (0, 0) as (left, top), and w, h as (right, bottom)
Construct a new rectangle from a position and a size
Returns true when the queried point is inside the rectangle
Returns the rectangle that is covered both by self and other.
None is returned if the rectangles do not overlap.
Return a point within this rectangle. The point should be in [0, 1] range.
Increase the size of the rectangle on the right and bottom side.
Decrease the size of the rectangle on all sides
Return a rectangle with the same size, but positioned at the origin
Apply a margin to the rectangle
Apply padding to the rectangle
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Rectangle
impl UnwindSafe for Rectangle
Blanket Implementations
Mutably borrows from an owned value. Read more