Ejemplo n.º 1
0
 public override void ConvertToVersion(ImgVersion version)
 {
     foreach (var entity in Album.List)
     {
         entity.Load();
         if (version <= ImgVersion.Ver2)
         {
             if (entity.Type == ColorBits.DXT_1)
             {
                 entity.Type = ColorBits.ARGB_1555;
             }
             if (entity.Type == ColorBits.DXT_5)
             {
                 entity.Type = ColorBits.ARGB_8888;
             }
         }
         else if (version == ImgVersion.Ver4)
         {
             entity.Type = ColorBits.ARGB_1555;
         }
         if (entity.CompressMode > CompressMode.ZLIB)
         {
             entity.CompressMode = CompressMode.ZLIB;
         }
     }
 }
Ejemplo n.º 2
0
 public override void ConvertToVersion(ImgVersion version)
 {
     if (version == ImgVersion.Ver4 || version == ImgVersion.Ver6)
     {
         Album.List.ForEach(item => item.Type = ColorBits.ARGB_1555);
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 ///     注册版本处理器
 /// </summary>
 /// <param name="version"></param>
 /// <param name="type"></param>
 public static void Regisity(ImgVersion version, Type type)
 {
     if (Dic.ContainsKey(version))
     {
         Dic.Remove(version);
     }
     Dic.Add(version, type);
 }
Ejemplo n.º 4
0
 public override void ConvertToVersion(ImgVersion version)
 {
     if (version <= ImgVersion.Ver2 || version == ImgVersion.Ver5)
     {
         foreach (var item in Album.List)
         {
             if (item.Type != ColorBits.LINK)
             {
                 item.Type = ColorBits.ARGB_8888;
             }
         }
     }
 }
Ejemplo n.º 5
0
 public override void ConvertToVersion(ImgVersion version)
 {
     if (version > ImgVersion.Ver2 && version != ImgVersion.Ver5)
     {
         return;
     }
     foreach (var item in Album.List)
     {
         if (item.Type != ColorBits.LINK)
         {
             item.Type = ColorBits.ARGB_8888;
         }
     }
 }
Ejemplo n.º 6
0
        public static Handler CreateHandler(ImgVersion version, Album album)
        {
            var type = Dic[version];

            return(type.CreateInstance(album) as Handler);
        }
Ejemplo n.º 7
0
 public virtual void ConvertToVersion(ImgVersion version)
 {
 }