Improve a couple of docstrings
This commit is contained in:
parent
7b641be7b0
commit
342737e2f0
2 changed files with 9 additions and 2 deletions
|
@ -6,7 +6,9 @@ pub struct FontImage {
|
||||||
pub version: u64,
|
pub version: u64,
|
||||||
pub width: usize,
|
pub width: usize,
|
||||||
pub height: usize,
|
pub height: usize,
|
||||||
/// White color with the given alpha (linear space 0-255).
|
/// The alpha (linear space 0-255) of something white.
|
||||||
|
///
|
||||||
|
/// One byte per pixel. Often you want to use [`Self::srgba_pixels`] instead.
|
||||||
pub pixels: Vec<u8>,
|
pub pixels: Vec<u8>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -160,8 +160,13 @@ pub trait App {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The size limit of the web app canvas.
|
/// The size limit of the web app canvas.
|
||||||
|
///
|
||||||
|
/// By default the size if limited to 1024x2048.
|
||||||
|
///
|
||||||
|
/// A larger canvas can lead to bad frame rates on some browsers on some platforms.
|
||||||
|
/// In particular, Firefox on Mac and Linux is really bad at handling large WebGL canvases:
|
||||||
|
/// <https://bugzilla.mozilla.org/show_bug.cgi?id=1010527#c0> (unfixed since 2014).
|
||||||
fn max_size_points(&self) -> egui::Vec2 {
|
fn max_size_points(&self) -> egui::Vec2 {
|
||||||
// Some browsers get slow with huge WebGL canvases, so we limit the size:
|
|
||||||
egui::Vec2::new(1024.0, 2048.0)
|
egui::Vec2::new(1024.0, 2048.0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue