#[non_exhaustive]pub struct Surface {
pub rect: PointRect,
pub bounds: PointRect,
pub unit: f32,
pub rtl: bool,
}Expand description
The surface the regions sit on and around, in points.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.rect: PointRectThe surface (an image, a canvas).
bounds: PointRectWhat the regions around it may use: the surface and its margin.
unit: f32The slot engine’s base unit, in points.
rtl: boolWhether start is on the right.
Implementations§
Source§impl Surface
impl Surface
Sourcepub fn new(rect: PointRect, unit: f32) -> Surface
pub fn new(rect: PointRect, unit: f32) -> Surface
A surface with no margin around it, left to right.
Sourcepub fn within(self, bounds: PointRect) -> Surface
pub fn within(self, bounds: PointRect) -> Surface
The same surface within bounds, the room for the regions around
it.
Sourcepub fn right_to_left(self, rtl: bool) -> Surface
pub fn right_to_left(self, rtl: bool) -> Surface
The same surface, start on the right when rtl.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Surface
impl<'de> Deserialize<'de> for Surface
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for Surface
impl StructuralPartialEq for Surface
Auto Trait Implementations§
impl Freeze for Surface
impl RefUnwindSafe for Surface
impl Send for Surface
impl Sync for Surface
impl Unpin for Surface
impl UnsafeUnpin for Surface
impl UnwindSafe for Surface
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