Rename Fill to ColorFilter in graphics::image::vector
This commit is contained in:
parent
2d58a2c033
commit
a2f71f42ba
1 changed files with 4 additions and 4 deletions
|
|
@ -8,8 +8,6 @@ use iced_native::Size;
|
||||||
use std::collections::{HashMap, HashSet};
|
use std::collections::{HashMap, HashSet};
|
||||||
use std::fs;
|
use std::fs;
|
||||||
|
|
||||||
type Fill = Option<[u8; 4]>;
|
|
||||||
|
|
||||||
/// Entry in cache corresponding to an svg handle
|
/// Entry in cache corresponding to an svg handle
|
||||||
pub enum Svg {
|
pub enum Svg {
|
||||||
/// Parsed svg
|
/// Parsed svg
|
||||||
|
|
@ -36,11 +34,13 @@ impl Svg {
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct Cache<T: Storage> {
|
pub struct Cache<T: Storage> {
|
||||||
svgs: HashMap<u64, Svg>,
|
svgs: HashMap<u64, Svg>,
|
||||||
rasterized: HashMap<(u64, u32, u32, Fill), T::Entry>,
|
rasterized: HashMap<(u64, u32, u32, ColorFilter), T::Entry>,
|
||||||
svg_hits: HashSet<u64>,
|
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> {
|
impl<T: Storage> Cache<T> {
|
||||||
/// Load svg
|
/// Load svg
|
||||||
pub fn load(&mut self, handle: &svg::Handle) -> &Svg {
|
pub fn load(&mut self, handle: &svg::Handle) -> &Svg {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue