Struct gpui2::ContentMask
source · #[repr(C)]pub struct ContentMask<P: Clone + Default + Debug> {
pub bounds: Bounds<P>,
}
Expand description
Indicates which region of the window is visible. Content falling outside of this mask will not be rendered. Currently, only rectangular content masks are supported, but we give the mask its own type to leave room to support more complex shapes in the future.
Fields§
§bounds: Bounds<P>
Implementations§
source§impl ContentMask<Pixels>
impl ContentMask<Pixels>
sourcepub fn scale(&self, factor: f32) -> ContentMask<ScaledPixels>
pub fn scale(&self, factor: f32) -> ContentMask<ScaledPixels>
Scale the content mask’s pixel units by the given scaling factor.
Trait Implementations§
source§impl<P: Clone + Clone + Default + Debug> Clone for ContentMask<P>
impl<P: Clone + Clone + Default + Debug> Clone for ContentMask<P>
source§fn clone(&self) -> ContentMask<P>
fn clone(&self) -> ContentMask<P>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<P: Default + Clone + Default + Debug> Default for ContentMask<P>
impl<P: Default + Clone + Default + Debug> Default for ContentMask<P>
source§fn default() -> ContentMask<P>
fn default() -> ContentMask<P>
Returns the “default value” for a type. Read more
source§impl<P: PartialEq + Clone + Default + Debug> PartialEq<ContentMask<P>> for ContentMask<P>
impl<P: PartialEq + Clone + Default + Debug> PartialEq<ContentMask<P>> for ContentMask<P>
source§fn eq(&self, other: &ContentMask<P>) -> bool
fn eq(&self, other: &ContentMask<P>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<P: Eq + Clone + Default + Debug> Eq for ContentMask<P>
impl<P: Clone + Default + Debug> StructuralEq for ContentMask<P>
impl<P: Clone + Default + Debug> StructuralPartialEq for ContentMask<P>
Auto Trait Implementations§
impl<P> RefUnwindSafe for ContentMask<P>where P: RefUnwindSafe,
impl<P> Send for ContentMask<P>where P: Send,
impl<P> Sync for ContentMask<P>where P: Sync,
impl<P> Unpin for ContentMask<P>where P: Unpin,
impl<P> UnwindSafe for ContentMask<P>where P: UnwindSafe,
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.