static void testAni() { AniFile file; using (var f = File.OpenRead(path)) file = new AniFile(f); Console.WriteLine(file); CursorTexture texture; using (var f = File.OpenRead(path)) texture = file.load(null, f, null); }
static CursorTexture loadAnimated(this IRenderDevice device, string resource, int idealSize) { using (var stm = openResource(resource)) { AniFile file; using (var unzip = new GZipStream(stm, CompressionMode.Decompress, true)) file = new AniFile(unzip); int index = file.formats.minIndex(ii => Math.Abs(ii.size.cx - idealSize)); stm.rewind(); using (var unzip = new GZipStream(stm, CompressionMode.Decompress)) return(file.load(device, unzip, "Busy cursor", index)); } }