Companion object for the Bitmap
class, providing factory methods for creating Bitmap
instances.
Attributes
Members list
Type members
Types
A type alias for functions generating colors based on pixel locations.
A type alias for functions generating colors based on pixel locations.
Attributes
Value members
Concrete methods
Creates a Bitmap
of specified dimensions using a function to generate pixel colors.
Creates a Bitmap
of specified dimensions using a function to generate pixel colors.
Value parameters
- contentGenerator
-
A function to generate colors for each pixel based on its location.
- height
-
The height of the bitmap.
- width
-
The width of the bitmap.
Attributes
- Returns
-
A new
Bitmap
instance.
Creates a Bitmap
from a sequence of colors, assuming row-wise population.
Creates a Bitmap
from a sequence of colors, assuming row-wise population.
Value parameters
- colors
-
A sequence of colors to populate the bitmap.
- height
-
The height of the bitmap.
- width
-
The width of the bitmap.
Attributes
- Returns
-
A new
Bitmap
instance.
Loads a Bitmap
from a resource path.
Loads a Bitmap
from a resource path.
Value parameters
- sourceResourcePath
-
The path to the source image resource.
Attributes
- Returns
-
A new
Bitmap
instance loaded from the specified path.
Creates a Bitmap
from a collection of picture elements.
Creates a Bitmap
from a collection of picture elements.
Value parameters
- elements
-
A collection of
PictureElement
instances to render into a bitmap.
Attributes
- Returns
-
A
Bitmap
representing the rendered picture elements.