예제 #1
0
        public static PackageStream OpenTexture(IPackageIndexer packageIndexer, string path)
        {
            var packagePath = packageIndexer.GetPackagePath(path);

            if (packagePath == null && Path.GetExtension(path) == ".tga")
            {
                path        = path.Substring(0, path.Length - 4) + ".dds";
                packagePath = packageIndexer.GetPackagePath(path);
            }

            return(new PackageStream(packagePath, path));
        }
 public static bool IsFileExisted(IPackageIndexer indexer, string path)
 {
     if (indexer == null)
     {
         return(false);
     }
     return(indexer.GetPackagePath(path) != null);
 }
 public static ImageSource Load(IPackageIndexer indexer, string path, double dpi = 96)
 {
     return(PackageImage.Load(indexer.GetPackagePath(path), path, dpi));
 }
예제 #4
0
 public PackageStream(IPackageIndexer indexer, string path)
     : this(indexer.GetPackagePath(path), path)
 {
 }