Merge branch 'master' into explicit-text-caching
This commit is contained in:
commit
b8e5693a30
178 changed files with 1768 additions and 1388 deletions
|
|
@ -96,13 +96,11 @@ impl Frame {
|
|||
/// resulting glyphs will not be rotated or scaled properly.
|
||||
///
|
||||
/// Additionally, all text will be rendered on top of all the layers of
|
||||
/// a [`Canvas`]. Therefore, it is currently only meant to be used for
|
||||
/// a `Canvas`. Therefore, it is currently only meant to be used for
|
||||
/// overlays, which is the most common use case.
|
||||
///
|
||||
/// Support for vectorial text is planned, and should address all these
|
||||
/// limitations.
|
||||
///
|
||||
/// [`Canvas`]: crate::widget::Canvas
|
||||
pub fn fill_text(&mut self, text: impl Into<Text>) {
|
||||
delegate!(self, frame, frame.fill_text(text));
|
||||
}
|
||||
|
|
@ -168,12 +166,18 @@ impl Frame {
|
|||
delegate!(self, frame, frame.rotate(angle));
|
||||
}
|
||||
|
||||
/// Applies a scaling to the current transform of the [`Frame`].
|
||||
/// Applies a uniform scaling to the current transform of the [`Frame`].
|
||||
#[inline]
|
||||
pub fn scale(&mut self, scale: f32) {
|
||||
pub fn scale(&mut self, scale: impl Into<f32>) {
|
||||
delegate!(self, frame, frame.scale(scale));
|
||||
}
|
||||
|
||||
/// Applies a non-uniform scaling to the current transform of the [`Frame`].
|
||||
#[inline]
|
||||
pub fn scale_nonuniform(&mut self, scale: impl Into<Vector>) {
|
||||
delegate!(self, frame, frame.scale_nonuniform(scale));
|
||||
}
|
||||
|
||||
pub fn into_geometry(self) -> Geometry {
|
||||
match self {
|
||||
Self::TinySkia(frame) => Geometry::TinySkia(frame.into_primitive()),
|
||||
|
|
|
|||
|
|
@ -1,3 +1,16 @@
|
|||
#![forbid(rust_2018_idioms)]
|
||||
#![deny(
|
||||
unsafe_code,
|
||||
unused_results,
|
||||
clippy::extra_unused_lifetimes,
|
||||
clippy::from_over_into,
|
||||
clippy::needless_borrow,
|
||||
clippy::new_without_default,
|
||||
clippy::useless_conversion,
|
||||
rustdoc::broken_intra_doc_links
|
||||
)]
|
||||
#![allow(clippy::inherent_to_string, clippy::type_complexity)]
|
||||
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
|
||||
pub mod compositor;
|
||||
|
||||
#[cfg(feature = "geometry")]
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
use crate::core::{Font, Pixels};
|
||||
use crate::graphics::Antialiasing;
|
||||
|
||||
/// The settings of a [`Backend`].
|
||||
///
|
||||
/// [`Backend`]: crate::Backend
|
||||
/// The settings of a Backend.
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
pub struct Settings {
|
||||
/// The default [`Font`] to use.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue