Example #1
0
 public TextureData(TextureData tex) : base(tex.w, tex.h)
 {
     format = tex.format;
     data   = new int[Size];
     Array.Copy(tex.data, data, Size);
 }
Example #2
0
 public bool CanCopyFrom(TextureData source)
 {
     return(format == source.format);
 }
Example #3
0
 public Slot(int _slice, int _x, int _y, int _w, int _h, bool _flip = false, TextureData _tex = null) : base(_w, _h)
 {
     slice  = _slice;
     x      = _x;
     y      = _y;
     flip   = _flip;
     tex    = _tex;
     offset = new Vector2(x, y) / SIZE;
     if (tex != null)
     {
         if (!flip)
         {
             texSize = new Vector2(tex.w, tex.h) / SIZE;
         }
         else
         {
             texSize = new Vector2(tex.h, tex.w) / SIZE;
         }
     }
 }