pub struct Text {Show 13 fields
pub shader: Option<ShaderRef>,
pub font: Cow<'static, str>,
pub size: f32,
pub text: Cow<'static, str>,
pub tint: Rgba<f32>,
pub horizontal_align: HorizontalAlign,
pub vertical_align: VerticalAlign,
pub width: Option<f32>,
pub height: Option<f32>,
pub uniforms: HashMap<Cow<'static, str>, GlowUniformValue>,
pub transform: Transform<f32, f32, f32>,
pub blending: Option<GlowBlending>,
pub screen_space: bool,
}
Fields§
§shader: Option<ShaderRef>
§font: Cow<'static, str>
§size: f32
§text: Cow<'static, str>
§tint: Rgba<f32>
§horizontal_align: HorizontalAlign
§vertical_align: VerticalAlign
§width: Option<f32>
§height: Option<f32>
§uniforms: HashMap<Cow<'static, str>, GlowUniformValue>
§transform: Transform<f32, f32, f32>
§blending: Option<GlowBlending>
§screen_space: bool
Implementations§
Source§impl Text
impl Text
pub fn new(shader: ShaderRef) -> Self
pub fn shader(self, value: ShaderRef) -> Self
pub fn font(self, value: impl Into<Cow<'static, str>>) -> Self
pub fn size(self, value: f32) -> Self
pub fn text(self, value: impl Into<Cow<'static, str>>) -> Self
pub fn tint(self, value: Rgba<f32>) -> Self
pub fn horizontal_align(self, value: HorizontalAlign) -> Self
pub fn vertical_align(self, value: VerticalAlign) -> Self
pub fn width(self, value: f32) -> Self
pub fn height(self, value: f32) -> Self
pub fn uniform(self, key: Cow<'static, str>, value: GlowUniformValue) -> Self
pub fn transform(self, value: Transform<f32, f32, f32>) -> Self
pub fn position(self, value: Vec2<f32>) -> Self
pub fn orientation(self, value: Quaternion<f32>) -> Self
pub fn rotation(self, angle_radians: f32) -> Self
pub fn scale(self, value: Vec2<f32>) -> Self
pub fn blending(self, value: GlowBlending) -> Self
pub fn screen_space(self, value: bool) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Text
impl !RefUnwindSafe for Text
impl !Send for Text
impl !Sync for Text
impl Unpin for Text
impl !UnwindSafe for Text
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