work
This commit is contained in:
1 parent
a9c76e4326
commit
79813db3ba
35 files changed
+378
-403
No files matched your search
@@ -7,3 +7,12 @@ pub use color::*;
|
||||
pub use layer::*;
|
||||
pub use text::*;
|
||||
pub use texture::*;
|
||||
|
||||
use crate::{Mask, util::TrackedArena};
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct PainterData {
|
||||
pub textures: Textures,
|
||||
pub text: TextData,
|
||||
pub masks: TrackedArena<Mask, u32>,
|
||||
}
|
||||
@@ -3,7 +3,7 @@ use cosmic_text::{
|
||||
Attrs, AttrsList, Buffer, CacheKey, Color, Family, FontSystem, Metrics, Placement, SwashCache,
|
||||
SwashContent,
|
||||
};
|
||||
use image::{GenericImageView, RgbaImage};
|
||||
use image::{DynamicImage, GenericImageView, RgbaImage};
|
||||
use std::simd::{Simd, num::SimdUint};
|
||||
|
||||
/// TODO: properly wrap this
|
||||
@@ -185,3 +185,7 @@ pub struct RenderedText {
|
||||
pub top_left_offset: Vec2,
|
||||
pub size: Vec2,
|
||||
}
|
||||
|
||||
pub trait HasTextures {
|
||||
fn add_texture(&mut self, image: DynamicImage) -> TextureHandle;
|
||||
}
|
||||
Reference in new issue
Block a user