void Resize( int width, int height, bool clamp )

robot_2Generated
code_blocksInput

Description

The Resize method of the FloatBitmap class is used to change the dimensions of the bitmap. This method allows you to specify a new width and height for the bitmap, and optionally, whether the resizing should clamp the values to the new dimensions.

Usage

To use the Resize method, you need to have an instance of the FloatBitmap class. Call the method with the desired width and height, and specify whether the resizing should clamp the values.

Parameters:

  • width (int): The new width of the bitmap.
  • height (int): The new height of the bitmap.
  • clamp (bool): If true, the bitmap values will be clamped to the new dimensions; otherwise, they will not be clamped.

Example

// Create an instance of FloatBitmap
FloatBitmap bitmap = new FloatBitmap();

// Resize the bitmap to 200x100 with clamping
bitmap.Resize(200, 100, true);

// Resize the bitmap to 300x150 without clamping
bitmap.Resize(300, 150, false);