예제 #1
0
 protected override async Task SaveOverrideAsync(IPaintShopRenderer renderer, string location)
 {
     foreach (var texture in _textures)
     {
         await renderer.SaveTextureAsync(Path.Combine(location, texture), _color.ToColor(), _opacity);
     }
 }
예제 #2
0
            protected override async Task SaveOverrideAsync(IPaintShopRenderer renderer, string location)
            {
                var value = Value.Value;

                if (value == null)
                {
                    return;
                }
                foreach (var pair in value)
                {
                    await renderer.SaveTextureAsync(Path.Combine(location, pair.Key), pair.Value);
                }
            }
예제 #3
0
 protected override async Task SaveOverrideAsync(IPaintShopRenderer renderer, string location)
 {
     foreach (var replacement in _replacements)
     {
         if (replacement.Value.Data != null)
         {
             await FileUtils.WriteAllBytesAsync(Path.Combine(location, replacement.Key), replacement.Value.Data);
         }
         else if (replacement.Value.Name != null)
         {
             await renderer.SaveTextureAsync(replacement.Key, replacement.Value);
         }
     }
 }
예제 #4
0
 protected Task SaveColorAsync(IPaintShopRenderer renderer, string location)
 {
     return(SupportsFlakes && Flakes > 0d
             ? renderer.SaveTextureFlakesAsync(Path.Combine(location, DetailsTexture), Color.ToColor(), FlakesSize, Flakes)
             : renderer.SaveTextureAsync(Path.Combine(location, DetailsTexture), Color.ToColor(), 1d));
 }