Struct solstice_2d::text::Text
source · pub struct Text { /* private fields */ }
Implementations§
source§impl Text
impl Text
pub fn new(ctx: &mut Context) -> Result<Self, GraphicsError>
pub fn add_font(&mut self, font_data: FontVec) -> FontId
pub fn set_text(
&mut self,
text: Text<'_>,
bounds: Rectangle,
layout: Layout<BuiltInLineBreaker>,
ctx: &mut Context
)
pub fn texture(&self) -> &Image
pub fn geometry(
&mut self,
ctx: &mut Context
) -> Geometry<&IndexedMesh<Vertex2D, u16>>
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> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.