Changes

Jump to navigation Jump to search
Line 352: Line 352:  
:: Extend the image if needed to fit the given size. Note that '''this is an expensive operation''', creates a new texture instance, and extending a spritesheet horizontally may cause game errors or bugs. For example:
 
:: Extend the image if needed to fit the given size. Note that '''this is an expensive operation''', creates a new texture instance, and extending a spritesheet horizontally may cause game errors or bugs. For example:
 
:: <syntaxhighlight lang="C#">
 
:: <syntaxhighlight lang="C#">
public void Edit<T>(IAssetData asset)
+
 
 +
e.Edit(asset =>
 
{
 
{
 
   var editor = asset.AsImage();
 
   var editor = asset.AsImage();
Line 358: Line 359:  
   // make sure the image is at least 1000px high
 
   // make sure the image is at least 1000px high
 
   editor.ExtendImage(minWidth: editor.Data.Width, minHeight: 1000);
 
   editor.ExtendImage(minWidth: editor.Data.Width, minHeight: 1000);
}
+
});
 
</syntaxhighlight>
 
</syntaxhighlight>
 
:: Available method arguments:
 
:: Available method arguments:
528

edits

Navigation menu