class Bitmap

book_4_sparkGenerated
code_blocksInput

Description

The Bitmap class in the Sandbox namespace provides a comprehensive set of methods and properties for manipulating bitmap images. It allows for pixel manipulation, drawing shapes, and exporting images in various formats.

Members

Static Members

Member Name Summary
CreateFromBytes Creates a bitmap from a byte array.
CreateFromIesBytes Creates a bitmap from IES byte data.
IsIes Determines if the byte data is in IES format.
CreateFromPsdBytes Creates a bitmap from PSD byte data.
IsPsd Determines if the byte data is in PSD format.
CreateFromSvgString Creates a bitmap from an SVG string.
CreateFromTgaBytes Creates a bitmap from TGA byte data.
IsTga Determines if the byte data is in TGA format.

Instance Members

Member Name Summary
Dispose Releases all resources used by the bitmap.
Clear Clears the bitmap with the specified color.
GetPixels Retrieves the pixel data of the bitmap as an array of colors.
GetPixels16 Retrieves the pixel data of the bitmap as an array of 16-bit colors.
GetPixels32 Retrieves the pixel data of the bitmap as an array of 32-bit colors.
SetPixel Sets the color of a specific pixel.
Clone Copies the bitmap to a new one without any changes.
IsOpaque Returns true if this bitmap is completely opaque (no alpha).
DrawRect Draws a rectangle on the bitmap.
DrawRoundRect Draws a rounded rectangle on the bitmap.
DrawCircle Draws a circle on the bitmap.
DrawPolygon Draws a polygon on the bitmap.
DrawArc Draws an arc on the bitmap.
DrawBitmap Draws another bitmap onto this bitmap.
DrawLine Draws a line between two points on the bitmap.
DrawLines Draws multiple lines on the bitmap.
Blur Applies a blur effect to the bitmap.
Sharpen Applies a sharpen effect to the bitmap.
Adjust Adjusts the brightness, contrast, saturation, and hue of the bitmap.
AdjustHue Adjusts the hue of the bitmap.
Colorize Applies a color overlay to the bitmap.
InsertPadding Adds padding to the bitmap.
HeightmapToNormalMap Converts a heightmap to a normal map.
SetAntialias Enables or disables antialiasing for drawing operations.
SetBlendMode Sets the blend mode for drawing operations.
SetPen Sets the pen color and width for drawing operations.
SetDashedPen Sets a dashed pen for drawing operations.
SetFill Sets the fill color for drawing operations.
SetLinearGradient Sets a linear gradient for drawing operations.
SetRadialGradient Sets a radial gradient for drawing operations.
ToJpg Exports the bitmap as a JPG byte array.
ToPng Exports the bitmap as a PNG byte array.
ToBmp Exports the bitmap as a BMP byte array.
ToWebP Exports the bitmap as a WebP byte array.
ToFormat Exports the bitmap in a specified format.
DrawText Draws text on the bitmap.
ToTexture Converts the bitmap to a texture.
Rotate Rotates the bitmap by a specified number of degrees.
Resize Resizes the bitmap to new dimensions.
FlipVertical Flips the bitmap vertically.
FlipHorizontal Flips the bitmap horizontally.
Crop Crops the bitmap to a specified rectangle.

Properties

Property Name Summary
Width Gets the width of the bitmap.
Height Gets the height of the bitmap.
BytesPerPixel Gets the number of bytes per pixel.
ByteCount Gets the total byte count of the bitmap.
Rect Gets the rectangle representing the bitmap's dimensions.
Center Gets the center point of the bitmap.
IsFloatingPoint Indicates if the bitmap uses floating point precision.
IsValid Indicates if the bitmap is valid.