SoftwareTexture class
Represents a texture on the host device whose pixels can be directly manipulated
Constructors
- SoftwareTexture.new(Size size)
-
size
holds the width and height in pixels of this texture
Properties
Methods
-
blit(
Uint8List src, Rect srcRect, Rect? dstRect) → void -
Copy a region of another Uint8List to this texture's buffer
srcRect
must contain the starting X and Y coordinates to copy from, and the width and height of the entire image held bysrc
.dstRect
if provided, gives a region of this texture's buffer to which to copy the pixels. -
dispose(
) → Future< void> - Dispose of the underlying resources of this texture
-
draw(
{Rect? area, bool redraw = true}) → Future - Push a region of the buffer to the underlying texture and optionally redraw it
-
generateTexture(
) → Future< void> - Instantiates the actual texture on the device and stores its texture ID
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
readPixels(
) → Future< void> - Retrieves the actual pixel data in the texture and stores in buffer
-
redraw(
) → Future< void> - Redraws the texture
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- bytesPerPixel → const int