Implement composable, type-safe renderer fallback
This commit is contained in:
parent
7e4ae8450e
commit
3645d34d6a
35 changed files with 1474 additions and 1210 deletions
|
|
@ -2,6 +2,7 @@
|
|||
use crate::core::image;
|
||||
use crate::core::svg;
|
||||
use crate::core::Size;
|
||||
use crate::Mesh;
|
||||
|
||||
use std::borrow::Cow;
|
||||
|
||||
|
|
@ -10,7 +11,7 @@ use std::borrow::Cow;
|
|||
/// [`Renderer`]: crate::Renderer
|
||||
pub trait Backend {
|
||||
/// The custom kind of primitives this [`Backend`] supports.
|
||||
type Primitive;
|
||||
type Primitive: TryFrom<Mesh, Error = &'static str>;
|
||||
}
|
||||
|
||||
/// A graphics backend that supports text rendering.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue