pub struct DxgiDuplicationFrameBuffer<'a> { /* private fields */ }展开描述
实现§
Source§impl<'a> DxgiDuplicationFrameBuffer<'a>
impl<'a> DxgiDuplicationFrameBuffer<'a>
Sourcepub const fn new(
raw_buffer: &'a mut [u8],
width: u32,
height: u32,
row_pitch: u32,
depth_pitch: u32,
format: DxgiDuplicationFormat,
) -> Self
pub const fn new( raw_buffer: &'a mut [u8], width: u32, height: u32, row_pitch: u32, depth_pitch: u32, format: DxgiDuplicationFormat, ) -> Self
构造一个新的 FrameBuffer。
Sourcepub const fn depth_pitch(&self) -> u32
pub const fn depth_pitch(&self) -> u32
获取帧缓冲区的深度跨度(depth pitch)。
Sourcepub const fn format(&self) -> DxgiDuplicationFormat
pub const fn format(&self) -> DxgiDuplicationFormat
获取帧缓冲区的颜色格式。
Sourcepub const fn has_padding(&self) -> bool
pub const fn has_padding(&self) -> bool
检查该缓冲区是否包含填充。
Sourcepub const fn as_raw_buffer(&mut self) -> &mut [u8] ⓘ
pub const fn as_raw_buffer(&mut self) -> &mut [u8] ⓘ
获取原始像素数据,其中可能包含填充。
Sourcepub fn save_as_image<T: AsRef<Path>>(
&mut self,
path: T,
format: ImageFormat,
) -> Result<(), Error>
pub fn save_as_image<T: AsRef<Path>>( &mut self, path: T, format: ImageFormat, ) -> Result<(), Error>
将帧缓冲区保存为指定路径的图像。
自动 Trait 实现§
impl<'a> Freeze for DxgiDuplicationFrameBuffer<'a>
impl<'a> RefUnwindSafe for DxgiDuplicationFrameBuffer<'a>
impl<'a> Send for DxgiDuplicationFrameBuffer<'a>
impl<'a> Sync for DxgiDuplicationFrameBuffer<'a>
impl<'a> Unpin for DxgiDuplicationFrameBuffer<'a>
impl<'a> UnsafeUnpin for DxgiDuplicationFrameBuffer<'a>
impl<'a> !UnwindSafe for DxgiDuplicationFrameBuffer<'a>
通用实现§
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
从拥有的值可变地借用。阅读更多
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
若
into_left 为 true,则将 self 转换为 Left 变体
(属于 Either<Self, Self>)。
否则将 self 转换为 Right 变体
(属于 Either<Self, Self>)。阅读更多Source§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
若
into_left(&self) 返回 true,则将 self 转换为 Left 变体
(属于 Either<Self, Self>)。
否则将 self 转换为 Right 变体
(属于 Either<Self, Self>)。阅读更多