/[gr2lib]/trunk/gr2lib/core/coretypes/implementation/Texture.cs
ViewVC logotype

Diff of /trunk/gr2lib/core/coretypes/implementation/Texture.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 183 by william, Fri Jul 23 21:08:46 2010 UTC revision 185 by william, Fri Jul 23 23:55:52 2010 UTC
# Line 14  using System.Drawing.Design; Line 14  using System.Drawing.Design;
14    
15  namespace gr2lib.core.coretypes.implementation  namespace gr2lib.core.coretypes.implementation
16  {  {
17        /// <summary>
18        /// Represents a Granny_Texture
19        /// </summary>
20      public class Texture : ITexture      public class Texture : ITexture
21      {      {
22          private GrannyRigResource _rigResource;          private GrannyRigResource _rigResource;
# Line 27  namespace gr2lib.core.coretypes.implemen Line 30  namespace gr2lib.core.coretypes.implemen
30          private Layout _Layout;          private Layout _Layout;
31          private List<Image> _Images;          private List<Image> _Images;
32    
33            /// <summary>
34            /// Gets the string representation of this instance
35            /// </summary>
36            /// <returns></returns>
37          public override string ToString()          public override string ToString()
38          {          {
39              return this.FromFileName.Name;              return this.FromFileName.Name;
40          }          }
41    
42          //private string _ParentResourceName;          //private string _ParentResourceName;
43            /// <summary>
44            /// Get's the parent resource name
45            /// </summary>
46          protected internal string ParentResourceName { get { return "Textures"; } }          protected internal string ParentResourceName { get { return "Textures"; } }
47    
48            /// <summary>
49            /// default constructor
50            /// </summary>
51          public Texture()// : base("Textures")          public Texture()// : base("Textures")
52          {          {
53              this.FromFileName = "";              this.FromFileName = "";
# Line 50  namespace gr2lib.core.coretypes.implemen Line 62  namespace gr2lib.core.coretypes.implemen
62              //this.NativePointer = IntPtr.Zero;              //this.NativePointer = IntPtr.Zero;
63              this._rigResource = new GrannyRigResource();              this._rigResource = new GrannyRigResource();
64          }          }
65            /// <summary>
66            /// default constructor (specifying index)
67            /// </summary>
68            /// <param name="index">the texture's index</param>
69          public Texture(int index)          public Texture(int index)
70          {          {
71              this.FromFileName = "";              this.FromFileName = "";
# Line 155  namespace gr2lib.core.coretypes.implemen Line 171  namespace gr2lib.core.coretypes.implemen
171          }          }
172    
173          #region ITexture Members          #region ITexture Members
174            /// <summary>
175            /// Get's the texture's name
176            /// </summary>
177          [RefreshPropertiesAttribute(RefreshProperties.All)]          [RefreshPropertiesAttribute(RefreshProperties.All)]
178          public FilePath FromFileName { get { return _FromFileName; } set { _FromFileName = value; } }          public FilePath FromFileName { get { return _FromFileName; } set { _FromFileName = value; } }
179            /// <summary>
180            /// Get's the texture's type
181            /// </summary>
182          [RefreshPropertiesAttribute(RefreshProperties.All)]          [RefreshPropertiesAttribute(RefreshProperties.All)]
183          [Editor(typeof(UIComboValueSelector<granny_texture_type, int>), typeof(UITypeEditor))]          [Editor(typeof(UIComboValueSelector<granny_texture_type, int>), typeof(UITypeEditor))]
184          public NameValuePair<string, granny_texture_type> TextureType { get { return _TextureType; } set { _TextureType = value; } }          public NameValuePair<string, granny_texture_type> TextureType { get { return _TextureType; } set { _TextureType = value; } }
185            /// <summary>
186            /// Get's the texture's widh
187            /// </summary>
188          [RefreshPropertiesAttribute(RefreshProperties.All)]          [RefreshPropertiesAttribute(RefreshProperties.All)]
189          public int Width { get { return _Width; } set { _Width = value; } }          public int Width { get { return _Width; } set { _Width = value; } }
190            /// <summary>
191            /// Get's the texture's height
192            /// </summary>
193          [RefreshPropertiesAttribute(RefreshProperties.All)]          [RefreshPropertiesAttribute(RefreshProperties.All)]
194          public int Height { get { return _Height; } set { _Height = value; } }          public int Height { get { return _Height; } set { _Height = value; } }
195            /// <summary>
196            /// Get's the texture's encoding
197            /// </summary>
198          [RefreshPropertiesAttribute(RefreshProperties.All)]          [RefreshPropertiesAttribute(RefreshProperties.All)]
199          [Editor(typeof(UIComboValueSelector<granny_texture_encoding, int>), typeof(UITypeEditor))]          [Editor(typeof(UIComboValueSelector<granny_texture_encoding, int>), typeof(UITypeEditor))]
200          public NameValuePair<string, granny_texture_encoding> Encoding { get { return _Encoding; } set { _Encoding = value; } }          public NameValuePair<string, granny_texture_encoding> Encoding { get { return _Encoding; } set { _Encoding = value; } }
201            /// <summary>
202            /// Get's the texture's subformat
203            /// </summary>
204          [RefreshPropertiesAttribute(RefreshProperties.All)]          [RefreshPropertiesAttribute(RefreshProperties.All)]
205          [Editor(typeof(UIComboValueSelector<granny_pixel_layout, int>), typeof(UITypeEditor))]          [Editor(typeof(UIComboValueSelector<granny_pixel_layout, int>), typeof(UITypeEditor))]
206          public NameValuePair<string, granny_pixel_layout> SubFormat { get { return _SubFormat; } set { _SubFormat = value; } }          public NameValuePair<string, granny_pixel_layout> SubFormat { get { return _SubFormat; } set { _SubFormat = value; } }
207            /// <summary>
208            /// Get's the texture's Pixel Layout
209            /// </summary>
210          [RefreshPropertiesAttribute(RefreshProperties.All)]          [RefreshPropertiesAttribute(RefreshProperties.All)]
211          [Browsable(true)]          [Browsable(true)]
212          public Layout Layout { get { return _Layout; } set { _Layout = value; } }          public Layout Layout { get { return _Layout; } set { _Layout = value; } }
213            /// <summary>
214            /// Get a List of Images associated with this texture
215            /// </summary>
216          [RefreshPropertiesAttribute(RefreshProperties.All)]          [RefreshPropertiesAttribute(RefreshProperties.All)]
217          public List<Image> Images { get { return _Images; } set { _Images = value; } }          public List<Image> Images { get { return _Images; } set { _Images = value; } }
218          #endregion          #endregion

Legend:
Removed from v.183  
changed lines
  Added in v.185

  ViewVC Help
Powered by ViewVC 1.1.22