Write missing documentation in iced_graphics
This commit is contained in:
parent
9fe65ed729
commit
b64e875205
3 changed files with 5 additions and 1 deletions
|
|
@ -16,6 +16,7 @@ pub trait Backend {
|
|||
fn trim_measurements(&mut self) {}
|
||||
}
|
||||
|
||||
/// A graphics backend that supports text rendering.
|
||||
pub trait Text {
|
||||
/// The icon font of the backend.
|
||||
const ICON_FONT: Font;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
//! 
|
||||
//!
|
||||
//! [`iced`]: https://github.com/hecrj/iced
|
||||
//#![deny(missing_docs)]
|
||||
#![deny(missing_docs)]
|
||||
#![deny(missing_debug_implementations)]
|
||||
#![deny(unused_results)]
|
||||
#![deny(unsafe_code)]
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//! Create a renderer from a [`Backend`].
|
||||
use crate::backend::{self, Backend};
|
||||
use crate::{Primitive, Vector};
|
||||
use iced_native::layout;
|
||||
|
|
@ -23,10 +24,12 @@ impl<B: Backend> Renderer<B> {
|
|||
}
|
||||
}
|
||||
|
||||
/// Returns the [`Backend`] of the [`Renderer`].
|
||||
pub fn backend(&self) -> &B {
|
||||
&self.backend
|
||||
}
|
||||
|
||||
/// Enqueues the given [`Primitive`] in the [`Renderer`] for drawing.
|
||||
pub fn draw_primitive(&mut self, primitive: Primitive) {
|
||||
self.primitives.push(primitive);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue