pub struct ImageCell { /* private fields */ }
Expand description
Tracks data for displaying an image in the place of the normal cell character data. Since an Image can span multiple cells, we need to logically carve up the image and track each slice of it. Each cell needs to know its “texture coordinates” within that image so that we can render the right slice.
Implementations
sourceimpl ImageCell
impl ImageCell
pub fn new(
top_left: TextureCoordinate,
bottom_right: TextureCoordinate,
data: Arc<ImageData>
) -> Self
pub fn with_z_index(
top_left: TextureCoordinate,
bottom_right: TextureCoordinate,
data: Arc<ImageData>,
z_index: i32,
padding_left: u16,
padding_top: u16,
padding_right: u16,
padding_bottom: u16,
image_id: Option<u32>,
placement_id: Option<u32>
) -> Self
pub fn matches_placement(&self, image_id: u32, placement_id: Option<u32>) -> bool
pub fn has_placement_id(&self) -> bool
pub fn image_id(&self) -> Option<u32>
pub fn placement_id(&self) -> Option<u32>
pub fn top_left(&self) -> TextureCoordinate
pub fn bottom_right(&self) -> TextureCoordinate
pub fn image_data(&self) -> &Arc<ImageData>
Trait Implementations
sourceimpl<'de> Deserialize<'de> for ImageCell
impl<'de> Deserialize<'de> for ImageCell
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ImageCell
impl StructuralEq for ImageCell
impl StructuralPartialEq for ImageCell
Auto Trait Implementations
impl RefUnwindSafe for ImageCell
impl Send for ImageCell
impl Sync for ImageCell
impl Unpin for ImageCell
impl UnwindSafe for ImageCell
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more