Record Class SDL_PixelFormatDetails

java.lang.Object
java.lang.Record
club.doki7.sdl3.datatype.SDL_PixelFormatDetails
All Implemented Interfaces:
IPointer, ISDL_PixelFormatDetails

@ValueBasedCandidate @UnsafeConstructor public record SDL_PixelFormatDetails(@NotNull MemorySegment segment) extends Record implements ISDL_PixelFormatDetails

Details about the format of a pixel.

Since: This struct is available since SDL 3.2.0.

Structure

typedef struct SDL_PixelFormatDetails {
    SDL_PixelFormat format;
    Uint8 bits_per_pixel;
    Uint8 bytes_per_pixel;
    Uint8[2] padding;
    Uint32 Rmask;
    Uint32 Gmask;
    Uint32 Bmask;
    Uint32 Amask;
    Uint8 Rbits;
    Uint8 Gbits;
    Uint8 Bbits;
    Uint8 Abits;
    Uint8 Rshift;
    Uint8 Gshift;
    Uint8 Bshift;
    Uint8 Ashift;
} SDL_PixelFormatDetails;

Contracts

The property segment() should always be not-null (segment != NULL && !segment.equals(MemorySegment.NULL)), and properly aligned to LAYOUT.byteAlignment() bytes. To represent null pointer, you may use a Java null instead. See the documentation of IPointer.segment() for more details.

The constructor of this class is marked as UnsafeConstructor, because it does not perform any runtime check. The constructor can be useful for automatic code generators.