Checkpoint
This commit is contained in:
parent
a8c1958c75
commit
3b27d41c72
9 changed files with 234 additions and 93 deletions
|
@ -215,9 +215,13 @@ impl TextSystem {
|
|||
})
|
||||
}
|
||||
|
||||
pub fn raster_bounds(&self, params: &GlyphRasterizationParams) -> Result<Bounds<DevicePixels>> {
|
||||
self.platform_text_system.glyph_raster_bounds(params)
|
||||
}
|
||||
|
||||
pub fn rasterize_glyph(
|
||||
&self,
|
||||
glyph_id: &RasterizeGlyphParams,
|
||||
glyph_id: &GlyphRasterizationParams,
|
||||
) -> Result<(Size<DevicePixels>, Vec<u8>)> {
|
||||
self.platform_text_system.rasterize_glyph(glyph_id)
|
||||
}
|
||||
|
@ -380,7 +384,7 @@ pub struct ShapedGlyph {
|
|||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
pub struct RasterizeGlyphParams {
|
||||
pub struct GlyphRasterizationParams {
|
||||
pub(crate) font_id: FontId,
|
||||
pub(crate) glyph_id: GlyphId,
|
||||
pub(crate) font_size: Pixels,
|
||||
|
@ -388,9 +392,9 @@ pub struct RasterizeGlyphParams {
|
|||
pub(crate) scale_factor: f32,
|
||||
}
|
||||
|
||||
impl Eq for RasterizeGlyphParams {}
|
||||
impl Eq for GlyphRasterizationParams {}
|
||||
|
||||
impl Hash for RasterizeGlyphParams {
|
||||
impl Hash for GlyphRasterizationParams {
|
||||
fn hash<H: Hasher>(&self, state: &mut H) {
|
||||
self.font_id.0.hash(state);
|
||||
self.glyph_id.0.hash(state);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue