pub struct Coordinates {
pub x: f32,
pub y: f32,
pub width: f32,
pub height: f32,
pub viewport_width: f32,
pub viewport_height: f32,
pub coordinate_space: &'static str,
pub expected_space: &'static str,
pub provenance: Provenance,
}Expand description
UI coordinates with actual and expected coordinate spaces. 同时携带实际坐标系和预期坐标系的 UI 坐标。
Fields§
§x: f32Logical x of the rectangle’s left edge. 矩形左边缘的逻辑 x 坐标。
y: f32Logical y of the rectangle’s top edge. 矩形上边缘的逻辑 y 坐标。
width: f32Rectangle width in the actual coordinate space. 实际坐标系下的矩形宽度。
height: f32Rectangle height in the actual coordinate space. 实际坐标系下的矩形高度。
viewport_width: f32Width of the viewport the rectangle must fit inside. 矩形必须落在其中的视口宽度。
viewport_height: f32Height of the viewport the rectangle must fit inside. 矩形必须落在其中的视口高度。
coordinate_space: &'static strCoordinate space the rectangle was measured in. 测量该矩形时所用的坐标系。
expected_space: &'static strCoordinate space the check requires; must match coordinate_space.
校验要求的坐标系,必须与 coordinate_space 相同。
provenance: ProvenanceEvidence explaining where these coordinates came from. 说明该坐标由来的证据。
Implementations§
Source§impl Coordinates
impl Coordinates
Trait Implementations§
Source§impl Clone for Coordinates
impl Clone for Coordinates
Source§fn clone(&self) -> Coordinates
fn clone(&self) -> Coordinates
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for Coordinates
impl RefUnwindSafe for Coordinates
impl Send for Coordinates
impl Sync for Coordinates
impl Unpin for Coordinates
impl UnsafeUnpin for Coordinates
impl UnwindSafe for Coordinates
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more