Struct three_d::core::ScissorBox
source · pub struct ScissorBox {
pub x: i32,
pub y: i32,
pub width: u32,
pub height: u32,
}
Expand description
Defines the part of the screen or render target that is rendered to. All pixels outside of the scissor box will not be modified. All values should be given in physical pixels.
Fields§
§x: i32
The distance in pixels from the left edge of the target.
y: i32
The distance in pixels from the bottom edge of the target.
width: u32
The width of the box.
height: u32
The height of the box.
Implementations§
source§impl ScissorBox
impl ScissorBox
sourcepub fn new_at_origo(width: u32, height: u32) -> Self
pub fn new_at_origo(width: u32, height: u32) -> Self
Creates a new scissor box which starts at origo (x and y are both zero).
sourcepub fn intersection(&self, other: impl Into<Self>) -> Self
pub fn intersection(&self, other: impl Into<Self>) -> Self
Returns the intersection between this and the other ScissorBox.
Trait Implementations§
source§impl Clone for ScissorBox
impl Clone for ScissorBox
source§fn clone(&self) -> ScissorBox
fn clone(&self) -> ScissorBox
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 Debug for ScissorBox
impl Debug for ScissorBox
source§impl From<ScissorBox> for Viewport
impl From<ScissorBox> for Viewport
source§fn from(viewport: ScissorBox) -> Self
fn from(viewport: ScissorBox) -> Self
Converts to this type from the input type.
source§impl From<Viewport> for ScissorBox
impl From<Viewport> for ScissorBox
source§impl PartialEq for ScissorBox
impl PartialEq for ScissorBox
source§fn eq(&self, other: &ScissorBox) -> bool
fn eq(&self, other: &ScissorBox) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for ScissorBox
impl StructuralPartialEq for ScissorBox
Auto Trait Implementations§
impl RefUnwindSafe for ScissorBox
impl Send for ScissorBox
impl Sync for ScissorBox
impl Unpin for ScissorBox
impl UnwindSafe for ScissorBox
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