public static ImageSource FromSvgPath(string path, int vectorWidth = 0, int vectorHeight = 0, Color fillColor = default(Color), FFImageSourceOptions options = null) { FFImageSource.AssemblyCache = FFImageSource.AssemblyCache ?? Assembly.GetCallingAssembly(); return(SvgFFImageSource.Create(path, vectorWidth, vectorHeight, fillColor, null, options)); }
public static FFImageSource Create(string path, FFImageSourceOptions options) { if (string.IsNullOrEmpty(path)) { return(null); } return(new FFImageSource { Path = path, Options = options, }); }
public static StreamFFImageSource Create(Func <Stream> stream, string key, FFImageSourceOptions options) { if (stream == null) { return(null); } key = key ?? stream.GetHashCode().ToString(); return(new StreamFFImageSource { Stream = token => Task.Run(() => stream(), token), Key = key, Options = options, }); }
public static SvgStreamFFImageSource Create( Func <Stream> stream, string key, int vectorWidth, int vectorHeight, Color fillColor, Dictionary <string, string> replaceStringMap, FFImageSourceOptions options) { if (stream == null) { return(null); } key = key ?? stream.GetHashCode().ToString(); return(new SvgStreamFFImageSource { Stream = token => Task.Run(() => stream(), token), Key = key, FillColor = fillColor, VectorWidth = vectorWidth, VectorHeight = vectorHeight, ReplaceStringMap = replaceStringMap, Options = options, }); }
public static SvgFFImageSource Create(string path, int vectorWidth, int vectorHeight, Color fillColor, Dictionary <string, string> replaceStringMap, FFImageSourceOptions options) { if (string.IsNullOrEmpty(path)) { return(null); } return(new SvgFFImageSource { Path = path, FillColor = fillColor, VectorWidth = vectorWidth, VectorHeight = vectorHeight, ReplaceStringMap = replaceStringMap, Options = options, }); }
public static ImageSource FromSvgStream(Func <Stream> stream, string key = null, int vectorWidth = 0, int vectorHeight = 0, Color fillColor = default(Color), FFImageSourceOptions options = null) { return(SvgStreamFFImageSource.Create(stream, key, vectorWidth, vectorHeight, fillColor, null, options)); }
public static ImageSource FromPath(string path, FFImageSourceOptions options = null) { FFImageSource.AssemblyCache = FFImageSource.AssemblyCache ?? Assembly.GetCallingAssembly(); return(FFImageSource.Create(path, options)); }
public static ImageSource FromStream(Func <Stream> stream, string key = null, FFImageSourceOptions options = null) { return(StreamFFImageSource.Create(stream, key, options)); }