Changeset 2926 for libpipi/trunk/pipi-sharp/Picture.cs
- Timestamp:
- 10/11/08 23:56:21 (5 years ago)
- File:
-
- 1 edited
-
libpipi/trunk/pipi-sharp/Picture.cs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libpipi/trunk/pipi-sharp/Picture.cs
r2874 r2926 22 22 { 23 23 private IntPtr _picture; 24 private string _filename; 24 25 25 public readonly string FileName; 26 public string FileName 27 { 28 get { return _filename; } 29 } 26 30 27 [DllImport("libpipi.dll", CallingConvention=CallingConvention.Cdecl), 28 SuppressUnmanagedCodeSecurity] 29 private static extern IntPtr pipi_load(string s); 30 public Picture(string s) 31 private Picture(IntPtr p) 31 32 { 32 _picture = pipi_load(s); 33 FileName = s; 33 _picture = p; 34 34 } 35 35 … … 40 40 { 41 41 pipi_free(_picture); 42 } 43 44 [DllImport("libpipi.dll", CallingConvention=CallingConvention.Cdecl), 45 SuppressUnmanagedCodeSecurity] 46 private static extern IntPtr pipi_load(string s); 47 public static Picture Load(string s) 48 { 49 IntPtr p = pipi_load(s); 50 if(p == IntPtr.Zero) 51 return null; 52 53 Picture ret = new Picture(p); 54 ret._filename = s; 55 return ret; 42 56 } 43 57
Note: See TracChangeset
for help on using the changeset viewer.
