Struct ggez::graphics::TextFragment
source · pub struct TextFragment {
pub text: String,
pub font: Option<String>,
pub scale: Option<PxScale>,
pub color: Option<Color>,
}
Expand description
Parameters of a single piece (“fragment”) of text, including font, color, and size.
Fields§
§text: String
The text itself.
font: Option<String>
Font name of the text framgnet, defaults to text’s font.
scale: Option<PxScale>
Pixel scale of the text framgent, defaults to text’s scale.
color: Option<Color>
Color of the text fragment, defaults to the text’s color.
Implementations§
Trait Implementations§
source§impl Clone for TextFragment
impl Clone for TextFragment
source§fn clone(&self) -> TextFragment
fn clone(&self) -> TextFragment
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 TextFragment
impl Debug for TextFragment
source§impl Default for TextFragment
impl Default for TextFragment
source§fn default() -> TextFragment
fn default() -> TextFragment
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for TextFragment
impl Send for TextFragment
impl Sync for TextFragment
impl Unpin for TextFragment
impl UnwindSafe for TextFragment
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
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
source§impl<T> HasMut<T> for T
impl<T> HasMut<T> for T
source§fn retrieve_mut(&mut self) -> &mut T
fn retrieve_mut(&mut self) -> &mut T
Method to retrieve the context type as mutable.