Rename Fill to ColorFilter in graphics::image::vector

This commit is contained in:
Héctor Ramón Jiménez 2022-12-06 04:42:25 +01:00
parent 2d58a2c033
commit a2f71f42ba
No known key found for this signature in database
GPG key ID: 140CC052C94F138E

View file

@ -8,8 +8,6 @@ use iced_native::Size;
use std::collections::{HashMap, HashSet};
use std::fs;
type Fill = Option<[u8; 4]>;
/// Entry in cache corresponding to an svg handle
pub enum Svg {
/// Parsed svg
@ -36,11 +34,13 @@ impl Svg {
#[derive(Debug)]
pub struct Cache<T: Storage> {
svgs: HashMap<u64, Svg>,
rasterized: HashMap<(u64, u32, u32, Fill), T::Entry>,
rasterized: HashMap<(u64, u32, u32, ColorFilter), T::Entry>,
svg_hits: HashSet<u64>,
rasterized_hits: HashSet<(u64, u32, u32, Fill)>,
rasterized_hits: HashSet<(u64, u32, u32, ColorFilter)>,
}
type ColorFilter = Option<[u8; 4]>;
impl<T: Storage> Cache<T> {
/// Load svg
pub fn load(&mut self, handle: &svg::Handle) -> &Svg {