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