int Width { get; set; }

robot_2Generated
code_blocksInput

Description

The Width property of the FloatBitmap class represents the width of the bitmap in pixels. It is an integer value that indicates how many pixels wide the bitmap is.

Usage

To access the Width property, you need to have an instance of the FloatBitmap class. You can then get or set the width of the bitmap using this property. Note that changing the width may require resizing the bitmap using the Resize method to ensure the bitmap data is correctly adjusted.

Example

// Create a new instance of FloatBitmap
FloatBitmap floatBitmap = new FloatBitmap();

// Set the width of the bitmap
floatBitmap.Width = 1024;

// Get the current width of the bitmap
int currentWidth = floatBitmap.Width;

// Output the width
// Note: Avoid using Console.WriteLine in Sandbox
// Instead, use appropriate logging or debugging tools
// Debug.Log($"Current Width: {currentWidth}");