ImageD class
Image, pixel data stored in CPU memory (RAM)
- Inheritance
-
- Object
- RaylibStruct<
ImageD> - ImageD
Constructors
-
ImageD({StructPointer<
ImageD> ? op, Uint8List? data, int width = 0, int height = 0, int mipmaps = 0, PixelFormat format = .PIXELFORMAT_NONE}) - ImageD.zero()
-
factory
Properties
- $state → RaylibTempStructState
-
Per-instance allocation state tracking slot keys, disposal, and identity.
finalinherited
- bytesPerPixel → int
-
Number of bytes per pixel, derived from format.
no setter
-
data
→ MemoryPointer<
RVoid> -
Image raw data
no setter
- dataLength → int
-
Total byte length of data, equal to frameSize * frameCount.
no setter
- dataView → Uint8List
-
no setter
- format ↔ PixelFormat
-
Data format (PixelFormat type)
getter/setter pair
- frameCount ↔ int
-
Number of frames in the image.
getter/setter pair
- frameSize → int
-
Byte size of a single frame, equal to width * height * bytesPerPixel.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- height ↔ int
-
Image base height
getter/setter pair
- mipmaps ↔ int
-
Mipmap levels, 1 by default
getter/setter pair
-
op
↔ StructPointer<
ImageD> ? -
The C-owned or RaylibTemp-owned typed pointer for this struct, if any.
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- structIsDisposed → bool
-
Whether structMarkDisposed has been called on this instance.
no setterinherited
- structName → String
-
The Dart-side type name of this struct
no setterinherited
- width ↔ int
-
Image base width
getter/setter pair
Methods
-
clone(
) → ImageD -
Returns a deep copy of this instance, preserving op if present.
override
-
copy(
) → ImageD -
Returns a deep copy of this instance without op.
inherited
-
getOp(
) → StructPointer< ImageD> -
Returns op, throwing a descriptive StateError if unavailable or this instance RaylibTempStructState.isDisposed.
inherited
-
getOpAndDispose(
) → StructPointer< ImageD> -
Returns op and immediately disposes this struct.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setDart(
ImageD o) → ImageD -
Copies the fields of
ointo this instance.override -
signature(
) → String -
Returns a human-readable representation of this struct.
override
-
structAllocateInto(
RaylibTemp< RaylibBase> temp, MemoryPointer<RType> p, String key) → void -
Allocates nested pointers into
tempunderkeyas needed.override -
structMarkDisposed(
) → void -
Marks this instance as disposed and clears op.
inherited
-
structOnOp(
void callback(StructPointer< ImageD> image)) → void -
Calls
callbackwith op if it is set, otherwise no-ops.inherited -
structReadFrom(
MemoryPointer< RType> p) → void -
override
-
structSetTag(
String newTag) → ImageD -
Sets RaylibTempStructState.tag to
newTag.inherited -
structSyncFromMemory(
) → void -
Syncs all fields from the memory. Requires op.
inherited
-
structSyncToMemory(
) → void -
Syncs all fields to the memory. Requires op.
inherited
-
structWriteInto(
MemoryPointer< RType> p) → void -
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
-
field_data
→ StructPointerValueField<
dynamic, RVoid> -
Field descriptor for data.
final
-
field_format
→ StructValueField<
PixelFormat, RType> -
Field descriptor for format.
final
-
field_height
→ StructValueField<
int, RInt> -
Field descriptor for height.
final
-
field_mipmaps
→ StructValueField<
int, RInt> -
Field descriptor for mipmaps.
final
-
field_width
→ StructValueField<
int, RInt> -
Field descriptor for width.
final
-
struct
→ StructType<
ImageD> -
Describes the raw memory layout, construction, and pointer representation
of this struct type.
final
-
structLayout
→ StructLayout<
ImageField> -
Raw memory layout of this object.
final
Static Methods
-
BASE_bytesPerPixel(
PixelFormat format) → int -
Returns the number of bytes per pixel for the given
format. -
BASE_dataLength(
int frameSize, int frameCount) → int - Returns the total byte length of all image data across all frames.
-
BASE_frameSize(
int width, int height, PixelFormat format) → int - Returns the byte size of a single frame.