public static Thumbnail Load(string path) { if (!System.IO.Path.IsPathRooted(path)) { throw new Exception("Not root"); } if (thumbnails.ContainsKey(path)) { return(thumbnails[path]); } var image = ReloadableImage.Create(Manager.HardwareDevice.GraphicsDevice, path); if (image == null) { return(null); } Thumbnail thumbnail = new Thumbnail(); thumbnail.Image = image; thumbnails.Add(path, thumbnail); return(thumbnail); }
public static ReloadableImage Create(GraphicsDevice graphicsDevice, string path) { global::System.IntPtr cPtr = EffekseerNativePINVOKE.ReloadableImage_Create(GraphicsDevice.getCPtr(graphicsDevice), path); ReloadableImage ret = (cPtr == global::System.IntPtr.Zero) ? null : new ReloadableImage(cPtr, true); return(ret); }
public ReloadableImage CreateReloadableImage(string path) { global::System.IntPtr cPtr = EffekseerNativePINVOKE.Native_CreateReloadableImage(swigCPtr, path); ReloadableImage ret = (cPtr == global::System.IntPtr.Zero) ? null : new ReloadableImage(cPtr, true); return(ret); }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ReloadableImage obj) { return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr); }