Skip to main content

TextFt2SourceV2

Struct TextFt2SourceV2 

Source
pub struct TextFt2SourceV2<'a> {
Show 13 fields pub antialiasing: bool, pub color1: RGBA8, pub color2: RGBA8, pub custom_width: u32, pub drop_shadow: bool, pub font: Font<'a>, pub from_file: bool, pub log_lines: u32, pub log_mode: bool, pub outline: bool, pub text: &'a str, pub text_file: &'a Path, pub word_wrap: bool,
}
Expand description

Settings specific to a FreeType2 text source.

Fields§

§antialiasing: bool

Draw the text with smoothed corners.

§color1: RGBA8

Top color of the text.

§color2: RGBA8

Bottom color of the text.

§custom_width: u32

Custom width (seems to have no effect).

§drop_shadow: bool

Draw a dark blurred shadow effect behind the text.

§font: Font<'a>

Settings for the font.

§from_file: bool

Load the text from a file (must be set in combination with Self::text_file).

§log_lines: u32

Amount of log lines if Self::log_mode is true. Minimum value is 1.

§log_mode: bool

Log mode (not sure what this does).

§outline: bool

Draw a black border around the text corners.

§text: &'a str

Text to display (only used if Self::from_file is false).

§text_file: &'a Path

File to load the display text from (Self::from_file must be true). The content must be in either UTF-8 or UTF-16 encoding.

§word_wrap: bool

Wrap the words within the boundaries of the scene item.

Implementations§

Source§

impl<'a> TextFt2SourceV2<'a>

Source

pub fn builder() -> TextFt2SourceV2Builder<'a>

Create an instance of TextFt2SourceV2 using the builder syntax

Trait Implementations§

Source§

impl Default for TextFt2SourceV2<'_>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'a> Serialize for TextFt2SourceV2<'a>

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for TextFt2SourceV2<'a>

§

impl<'a> RefUnwindSafe for TextFt2SourceV2<'a>

§

impl<'a> Send for TextFt2SourceV2<'a>

§

impl<'a> Sync for TextFt2SourceV2<'a>

§

impl<'a> Unpin for TextFt2SourceV2<'a>

§

impl<'a> UnsafeUnpin for TextFt2SourceV2<'a>

§

impl<'a> UnwindSafe for TextFt2SourceV2<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more