mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-24 21:51:14 +03:00
set fmt and stride to private in ImageRgb
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
@@ -53,22 +53,32 @@ pub enum ImageFormat {
|
||||
|
||||
pub struct ImageRgb {
|
||||
pub raw: Vec<u8>,
|
||||
pub fmt: ImageFormat,
|
||||
pub w: usize,
|
||||
pub h: usize,
|
||||
pub stride: usize,
|
||||
fmt: ImageFormat,
|
||||
stride: usize,
|
||||
}
|
||||
|
||||
impl ImageRgb {
|
||||
pub fn new(fmt: ImageFormat, stride: usize) -> Self {
|
||||
Self {
|
||||
raw: Vec::new(),
|
||||
fmt,
|
||||
w: 0,
|
||||
h: 0,
|
||||
fmt,
|
||||
stride,
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn fmt(&self) -> ImageFormat {
|
||||
self.fmt
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn stride(&self) -> usize {
|
||||
self.stride
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
||||
Reference in New Issue
Block a user