This commit is contained in:
iris committed 2026-01-12 18:40:27 -05:00
1 parent a9c76e4326
commit 79813db3ba
35 files changed
+378 -403

No files matched your search

+9
View File
@@ -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>,
}
+5 -1
View File
@@ -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;
}