#[repr(C)]
#[derive(Debug, Clone, Copy)]
pub struct PictRect {
pub top: i16,
pub left: i16,
pub bottom: i16,
pub right: i16,
}
#[repr(C)]
#[derive(Debug, Clone)]
pub struct PictBitmap {
pub row_bytes: i16,
pub bounds: PictRect,
pub src_rect: PictRect,
pub dst_rect: PictRect,
pub mode: i16,
pub data: Vec<u8>,
}
#[repr(C)]
#[derive(Debug, Clone)]
pub struct PictRegion {
pub region_size: i16,
pub rect: PictRect,
}
impl PictRect {
#[inline(always)]
pub fn width(&self) -> i16 {
self.right - self.left
}
#[inline(always)]
pub fn height(&self) -> i16 {
self.bottom - self.top
}
}
impl PictBitmap {
#[inline(always)]
pub fn width(&self) -> i16 {
self.bounds.width()
}
#[inline(always)]
pub fn height(&self) -> i16 {
self.bounds.height()
}
}