pub struct VisualOptions { /* private fields */ }Expand description
The inner options of a Visual.
The main difference with NcVisualOptions
is the absence of a reference to a Plane.
Implementations§
Source§impl VisualOptions
§setter methods
impl VisualOptions
§setter methods
Sourcepub fn set_halign(&mut self, horizontal: Align)
pub fn set_halign(&mut self, horizontal: Align)
Sets the horizontal alignment.
Sourcepub fn set_valign(&mut self, vertical: Align)
pub fn set_valign(&mut self, vertical: Align)
Sets the vertical alignment.
Sourcepub fn set_region(&mut self, region: Option<(u32, u32, u32, u32)>)
pub fn set_region(&mut self, region: Option<(u32, u32, u32, u32)>)
Sets the region of the visual to be rendered (x, y, len_x, len_y).
Sourcepub fn set_cell_offset(&mut self, cell_offset: Option<(u32, u32)>)
pub fn set_cell_offset(&mut self, cell_offset: Option<(u32, u32)>)
Sets the pixel offset within the cell (x, y).
Default: None.
Sourcepub fn set_blitter(&mut self, blitter: Blitter)
pub fn set_blitter(&mut self, blitter: Blitter)
Sets the blitter.
Default: Blitter::Default.
Sourcepub fn set_transparency(&mut self, color: Option<impl Into<Rgba>>)
pub fn set_transparency(&mut self, color: Option<impl Into<Rgba>>)
(Un)Sets the transparent color.
Default: None.
Sourcepub fn set_degrade(&mut self, degrade: bool)
pub fn set_degrade(&mut self, degrade: bool)
(Un)Sets degradation.
Default: true (degrades).
Sourcepub fn set_interpolate(&mut self, interpolate: bool)
pub fn set_interpolate(&mut self, interpolate: bool)
(Un)Sets interpolation.
Default: true (interpolates).
Source§impl VisualOptions
§flag query getter methods
impl VisualOptions
§flag query getter methods
Sourcepub fn is_veraligned(&self) -> bool
pub fn is_veraligned(&self) -> bool
Returns true if it has the VerAligned flag set.
Sourcepub fn is_horaligned(&self) -> bool
pub fn is_horaligned(&self) -> bool
Returns true if it has the HorAligned flag set.
Sourcepub fn does_blend(&self) -> bool
pub fn does_blend(&self) -> bool
Returns true if it has the Blend flag set.
Sourcepub fn does_degrade(&self) -> bool
pub fn does_degrade(&self) -> bool
Returns false if it has the NoDegrade flag set.
Sourcepub fn does_interpolate(&self) -> bool
pub fn does_interpolate(&self) -> bool
Returns false if it has the NoInterpolate flag set.
Trait Implementations§
Source§impl Clone for VisualOptions
impl Clone for VisualOptions
Source§fn clone(&self) -> VisualOptions
fn clone(&self) -> VisualOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VisualOptions
impl Debug for VisualOptions
Source§impl Default for VisualOptions
impl Default for VisualOptions
Source§fn default() -> VisualOptions
fn default() -> VisualOptions
Returns the “default value” for a type. Read more
Source§impl Display for VisualOptions
impl Display for VisualOptions
Source§impl<'n> From<NcVisualOptionsBuilder<'n>> for VisualOptions
impl<'n> From<NcVisualOptionsBuilder<'n>> for VisualOptions
Source§fn from(ob: NcVisualOptionsBuilder<'n>) -> VisualOptions
fn from(ob: NcVisualOptionsBuilder<'n>) -> VisualOptions
Converts to this type from the input type.
Source§impl<'n> From<VisualOptions> for NcVisualOptionsBuilder<'n>
impl<'n> From<VisualOptions> for NcVisualOptionsBuilder<'n>
Source§fn from(vo: VisualOptions) -> NcVisualOptionsBuilder<'n>
fn from(vo: VisualOptions) -> NcVisualOptionsBuilder<'n>
Converts to this type from the input type.
Source§impl From<VisualOptions> for NcVisualOptions
impl From<VisualOptions> for NcVisualOptions
Source§fn from(vo: VisualOptions) -> NcVisualOptions
fn from(vo: VisualOptions) -> NcVisualOptions
Converts to this type from the input type.
Source§impl From<ncvisual_options> for VisualOptions
impl From<ncvisual_options> for VisualOptions
Source§fn from(ncvo: NcVisualOptions) -> VisualOptions
fn from(ncvo: NcVisualOptions) -> VisualOptions
Converts to this type from the input type.
Source§impl PartialEq for VisualOptions
impl PartialEq for VisualOptions
impl Copy for VisualOptions
impl Eq for VisualOptions
impl StructuralPartialEq for VisualOptions
Auto Trait Implementations§
impl Freeze for VisualOptions
impl RefUnwindSafe for VisualOptions
impl Send for VisualOptions
impl Sync for VisualOptions
impl Unpin for VisualOptions
impl UnwindSafe for VisualOptions
Blanket Implementations§
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
Mutably borrows from an owned value. Read more