Struct egui::TextFormat
source · pub struct TextFormat {
pub font_id: FontId,
pub color: Color32,
pub background: Color32,
pub italics: bool,
pub underline: Stroke,
pub strikethrough: Stroke,
pub valign: Align,
}
Fields§
§font_id: FontId
§color: Color32
Text color
background: Color32
§italics: bool
§underline: Stroke
§strikethrough: Stroke
§valign: Align
If you use a small font and Align::TOP
you
can get the effect of raised text.
Implementations§
source§impl TextFormat
impl TextFormat
pub fn simple(font_id: FontId, color: Color32) -> TextFormat
Trait Implementations§
source§impl Clone for TextFormat
impl Clone for TextFormat
source§fn clone(&self) -> TextFormat
fn clone(&self) -> TextFormat
Returns a copy 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 TextFormat
impl Debug for TextFormat
source§impl Default for TextFormat
impl Default for TextFormat
source§fn default() -> TextFormat
fn default() -> TextFormat
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for TextFormat
impl<'de> Deserialize<'de> for TextFormat
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<TextFormat, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<TextFormat, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Hash for TextFormat
impl Hash for TextFormat
source§impl PartialEq<TextFormat> for TextFormat
impl PartialEq<TextFormat> for TextFormat
source§fn eq(&self, other: &TextFormat) -> bool
fn eq(&self, other: &TextFormat) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for TextFormat
impl Serialize for TextFormat
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more