[−][src]Struct sunrise_vi::Buffer
Internal representation of a window.
Fields
top: i32
left: i32
width: u32
height: u32
mem: MappedSharedMemory
Implementations
impl Buffer
[src]
fn get_real_bounds(
&self,
framebuffer_width: u32,
framebuffer_height: u32
) -> (u32, u32, u32, u32)
[src]
&self,
framebuffer_width: u32,
framebuffer_height: u32
) -> (u32, u32, u32, u32)
Returns the buffer's bounds within the given width/height, cropping as necessary.
Panics
Panics on overflow if top + height overflows.
fn width(&self) -> u32
[src]
Get the width of this buffer.
fn height(&self) -> u32
[src]
Get the height of this buffer.
pub fn get_buffer(&self) -> &[AtomicU32]
[src]
Gets the underlying framebuffer
pub fn get_px_offset(&self, x: usize, y: usize) -> usize
[src]
Gets the offset in memory of a pixel based on an x and y.
Panics
Panics if y >= self.height()
or x >= self.width()
fn draw(&self)
[src]
Blit the buffer to the framebuffer.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Buffer
impl Send for Buffer
impl Sync for Buffer
impl Unpin for Buffer
impl UnwindSafe for Buffer
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SizedIPCBuffer for T
[src]
fn size(&self) -> usize
[src]
fn is_cool(addr: usize, size: usize) -> bool
[src]
unsafe fn from_raw_parts<'a>(addr: usize, _size: usize) -> &'a T
[src]
unsafe fn from_raw_parts_mut<'a>(addr: usize, _size: usize) -> &'a mut T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,