Checkpoint: emojis rendering
This commit is contained in:
parent
cd1c137542
commit
5c750b6880
12 changed files with 453 additions and 427 deletions
|
@ -147,8 +147,7 @@ pub trait PlatformWindow {
|
|||
fn is_topmost_for_position(&self, position: Point<Pixels>) -> bool;
|
||||
fn draw(&self, scene: Scene);
|
||||
|
||||
fn monochrome_sprite_atlas(&self) -> Arc<dyn PlatformAtlas>;
|
||||
fn polychrome_sprite_atlas(&self) -> Arc<dyn PlatformAtlas>;
|
||||
fn sprite_atlas(&self) -> Arc<dyn PlatformAtlas>;
|
||||
}
|
||||
|
||||
pub trait PlatformDispatcher: Send + Sync {
|
||||
|
@ -182,6 +181,15 @@ pub enum AtlasKey {
|
|||
Svg(RenderSvgParams),
|
||||
}
|
||||
|
||||
impl AtlasKey {
|
||||
pub fn is_monochrome(&self) -> bool {
|
||||
match self {
|
||||
AtlasKey::Glyph(params) => !params.is_emoji,
|
||||
AtlasKey::Svg(_) => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<RenderGlyphParams> for AtlasKey {
|
||||
fn from(params: RenderGlyphParams) -> Self {
|
||||
Self::Glyph(params)
|
||||
|
@ -250,12 +258,6 @@ pub trait PlatformInputHandler {
|
|||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct ScreenId(pub(crate) Uuid);
|
||||
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
pub enum RasterizationOptions {
|
||||
Alpha,
|
||||
Bgra,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct WindowOptions {
|
||||
pub bounds: WindowBounds,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue