Click or drag to resize

GH_MemoryBitmapPadBitmap Method

Add padding edges around a bitmap.

Namespace:  Grasshopper.Kernel
Assembly:  Grasshopper (in Grasshopper.dll)
Syntax
public static Bitmap PadBitmap(
	Image bmp,
	Padding padding,
	Color padding_color
)

Parameters

bmp
Type: System.DrawingImage
Source bitmap.
padding
Type: System.Windows.FormsPadding
Padding to apply.
padding_color
Type: System.DrawingColor
Color of padded edges.

Return Value

Type: Bitmap
A new bitmap with padded edges and the same PixelFormat as the original bitmap.
See Also