[−][src]Struct conrod_core::render::Text
A type used for producing a PositionedGlyph
iterator.
We produce this type rather than the &[PositionedGlyph]
s directly so that we can properly
handle "HiDPI" scales when caching glyphs.
Implementations
impl<'a> Text<'a>
[src]
pub fn positioned_glyphs(self, dpi_factor: f32) -> &'a [PositionedGlyph]
[src]
Produces a list of PositionedGlyph
s which may be used to cache and render the text.
dpi_factor
, aka "dots per inch factor" is a multiplier representing the density of
the display's pixels. The Scale
of the font will be multiplied by this factor in order to
ensure that each PositionedGlyph
's pixel_bounding_box
is accurate and that the GPU
cache receives glyphs of a size that will display correctly on displays regardless of DPI.
Note that conrod does not require this factor when instantiating Text
widgets and laying
out text. This is because conrod positioning uses a "pixel-agnostic" Scalar
value
representing perceived distances for its positioning and layout, rather than pixel
values. During rendering however, the pixel density must be known
Auto Trait Implementations
impl<'a> RefUnwindSafe for Text<'a>
impl<'a> Send for Text<'a>
impl<'a> Sync for Text<'a>
impl<'a> Unpin for Text<'a>
impl<'a> !UnwindSafe for Text<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,