pub struct CueTextRun {
pub text: String,
pub bold: bool,
pub italic: bool,
pub underline: bool,
pub color: Option<Color>,
pub background: Option<Color>,
pub font_size: Option<f32>,
pub font_family: Option<String>,
pub edge: Option<CueTextEdge>,
pub edge_color: Option<Color>,
}Expand description
Text of one style. Each field the media may leave unsaid is None where it does.
Fields§
§text: String§bold: bool§italic: bool§underline: bool§color: Option<Color>§background: Option<Color>The colour behind these characters.
font_size: Option<f32>The text’s height as a fraction of the picture’s.
font_family: Option<String>§edge: Option<CueTextEdge>§edge_color: Option<Color>Implementations§
Source§impl CueTextRun
impl CueTextRun
Sourcepub const DEFAULT_FONT_SIZE: f32 = 0.0533
pub const DEFAULT_FONT_SIZE: f32 = 0.0533
The height Media3’s SubtitleView gives text by default, DEFAULT_TEXT_SIZE_FRACTION: a
fraction of the picture’s.
Sourcepub fn new(text: impl Into<String>) -> CueTextRun
pub fn new(text: impl Into<String>) -> CueTextRun
text in no style of its own: neither bold, italic nor underlined, and every other field
unsaid.
Trait Implementations§
Source§impl Clone for CueTextRun
impl Clone for CueTextRun
Source§impl Debug for CueTextRun
impl Debug for CueTextRun
Source§impl PartialEq for CueTextRun
impl PartialEq for CueTextRun
impl StructuralPartialEq for CueTextRun
Auto Trait Implementations§
impl Freeze for CueTextRun
impl RefUnwindSafe for CueTextRun
impl Send for CueTextRun
impl Sync for CueTextRun
impl Unpin for CueTextRun
impl UnsafeUnpin for CueTextRun
impl UnwindSafe for CueTextRun
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