[][src]Struct makepad_render::Text

pub struct Text {
    pub text_style: TextStyle,
    pub shader: Shader,
    pub color: Color,
    pub z: f32,
    pub wrapping: Wrapping,
    pub font_scale: f32,
}

Fields

text_style: TextStyleshader: Shadercolor: Colorz: f32wrapping: Wrappingfont_scale: f32

Methods

impl Text[src]

pub fn new(cx: &mut Cx) -> Self[src]

pub fn instance_font_tc() -> InstanceVec4[src]

pub fn instance_color() -> InstanceColor[src]

pub fn instance_x() -> InstanceFloat[src]

pub fn instance_y() -> InstanceFloat[src]

pub fn instance_w() -> InstanceFloat[src]

pub fn instance_h() -> InstanceFloat[src]

pub fn instance_z() -> InstanceFloat[src]

pub fn instance_base_x() -> InstanceFloat[src]

pub fn instance_base_y() -> InstanceFloat[src]

pub fn instance_font_size() -> InstanceFloat[src]

pub fn instance_marker() -> InstanceFloat[src]

pub fn instance_char_offset() -> InstanceFloat[src]

pub fn uniform_brightness() -> UniformFloat[src]

pub fn uniform_curve() -> UniformFloat[src]

pub fn def_text_shader() -> ShaderGen[src]

pub fn begin_text(&mut self, cx: &mut Cx) -> AlignedInstance[src]

pub fn add_text<F>(
    &mut self,
    cx: &mut Cx,
    geom_x: f32,
    geom_y: f32,
    char_offset: usize,
    aligned: &mut AlignedInstance,
    chunk: &[char],
    char_callback: F
) where
    F: FnMut(char, usize, f32, f32) -> f32
[src]

pub fn end_text(&mut self, cx: &mut Cx, aligned: &AlignedInstance) -> Area[src]

pub fn draw_text(&mut self, cx: &mut Cx, text: &str) -> Area[src]

pub fn find_closest_offset(&self, cx: &Cx, area: &Area, pos: Vec2) -> usize[src]

pub fn get_monospace_base(&self, cx: &Cx) -> Vec2[src]

Trait Implementations

impl Clone for Text[src]

Auto Trait Implementations

impl RefUnwindSafe for Text

impl Send for Text

impl Sync for Text

impl Unpin for Text

impl UnwindSafe for Text

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.