Changes in trunk/MacFaceLibrary/Part.cs [23:13]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MacFaceLibrary/Part.cs
r23 r13 15 15 { 16 16 private Image _image; 17 private string _ imagePath;17 private string _filename; 18 18 private Point _point; 19 19 20 /*public Part(string basePath, Hashtable partDef) 21 { 22 this.path = (string)Path.Combine(partDef["filename"]); 23 this.x = (int)partDef["pos x"]; 24 this.y = (int)partDef["pos y"]; 25 }*/ 26 20 27 public Part(String path, int x, int y) 21 28 { 22 _ imagePath = path;29 _filename = System.IO.Path.GetFileName(path); 23 30 _image = Image.FromFile(path); 24 _point.X = x;25 _point.Y = y;31 this.X = x; 32 this.Y = y; 26 33 } 27 34 28 35 public Part(String path, Image image, int x, int y) 29 36 { 30 _imagePath = path;31 32 _point.X = x;33 _point.Y = y;37 _filename = System.IO.Path.GetFileName(path); 38 _image = image; 39 this.X = x; 40 this.Y = y; 34 41 } 35 42 36 43 public string FileName 37 44 { 38 get 39 { 40 return System.IO.Path.GetFileName(_imagePath); 41 } 42 } 45 get { return _filename; } 46 } 43 47 44 48 public Image Image … … 60 64 public int Y 61 65 { 62 get { return _point.Y; }63 set { _point.Y = value; }66 get { return 128 - _point.Y - _image.Height; } 67 set { _point.Y = 128 - value - _image.Height; } 64 68 } 65 69
Note: See TracChangeset
for help on using the changeset viewer.