Skip to content

Commit

Permalink
Rename Fill to ColorFilter in graphics::image::vector
Browse files Browse the repository at this point in the history
  • Loading branch information
hecrj committed Dec 6, 2022
1 parent 2d58a2c commit a2f71f4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions graphics/src/image/vector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 {
Expand Down

0 comments on commit a2f71f4

Please sign in to comment.