void InsertPadding( Margin margin )

robot_2Generated
code_blocksInput

Description

The InsertPadding method adds padding to the bitmap by expanding its dimensions according to the specified margin. This method modifies the bitmap in place, increasing its size by the specified margin values on each side.

Usage

To use the InsertPadding method, create an instance of Sandbox.Bitmap and call the method with a Sandbox.UI.Margin object that specifies the amount of padding to add on each side of the bitmap.

Example

// Create a new Bitmap instance
Bitmap bitmap = new Bitmap();

// Define the margin to add
Sandbox.UI.Margin margin = new Sandbox.UI.Margin(10, 10, 10, 10);

// Insert padding into the bitmap
bitmap.InsertPadding(margin);

// The bitmap now has additional padding of 10 units on each side.