mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 13:20:05 -04:00
Fix docs
This commit is contained in:
@@ -15,7 +15,7 @@ pub struct TextShape {
|
||||
/// Usually the top left corner of the first character.
|
||||
pub pos: Pos2,
|
||||
|
||||
/// The laid out text, from [`Fonts::layout_job`].
|
||||
/// The laid out text, from [`FontsView::layout_job`].
|
||||
pub galley: Arc<Galley>,
|
||||
|
||||
/// Add this underline to the whole text.
|
||||
|
||||
@@ -700,7 +700,7 @@ impl FontsView<'_> {
|
||||
/// How full is the font atlas?
|
||||
///
|
||||
/// This increases as new fonts and/or glyphs are used,
|
||||
/// but can also decrease in a call to [`Self::begin_pass`].
|
||||
/// but can also decrease in a call to [`Fonts::begin_pass`].
|
||||
pub fn font_atlas_fill_ratio(&self) -> f32 {
|
||||
self.fonts.atlas.fill_ratio()
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ impl Paragraph {
|
||||
|
||||
/// Layout text into a [`Galley`].
|
||||
///
|
||||
/// In most cases you should use [`crate::Fonts::layout_job`] instead
|
||||
/// In most cases you should use [`crate::FontsView::layout_job`] instead
|
||||
/// since that memoizes the input, making subsequent layouting of the same text much faster.
|
||||
pub fn layout(fonts: &mut FontsImpl, job: Arc<LayoutJob>, pixels_per_point: f32) -> Galley {
|
||||
profiling::function_scope!();
|
||||
|
||||
@@ -15,7 +15,7 @@ use emath::{Align, GuiRounding as _, NumExt as _, OrderedFloat, Pos2, Rect, Vec2
|
||||
///
|
||||
/// This supports mixing different fonts, color and formats (underline etc).
|
||||
///
|
||||
/// Pass this to [`crate::Fonts::layout_job`] or [`crate::text::layout`].
|
||||
/// Pass this to [`crate::FontsView::layout_job`] or [`crate::text::layout`].
|
||||
///
|
||||
/// ## Example:
|
||||
/// ```
|
||||
@@ -504,7 +504,7 @@ impl TextWrapping {
|
||||
|
||||
/// Text that has been laid out, ready for painting.
|
||||
///
|
||||
/// You can create a [`Galley`] using [`crate::Fonts::layout_job`];
|
||||
/// You can create a [`Galley`] using [`crate::FontsView::layout_job`];
|
||||
///
|
||||
/// Needs to be recreated if the underlying font atlas texture changes, which
|
||||
/// happens under the following conditions:
|
||||
|
||||
Reference in New Issue
Block a user