Record Class STBTT_PackContext

java.lang.Object
java.lang.Record
club.doki7.stb.truetype.datatype.STBTT_PackContext
All Implemented Interfaces:
IPointer, ISTBTT_PackContext

@ValueBasedCandidate @UnsafeConstructor public record STBTT_PackContext(@NotNull MemorySegment segment) extends Record implements ISTBTT_PackContext

Represents a pointer to a stbtt_pack_context structure in native memory.

Structure

typedef struct stbtt_pack_context {
    void* userAllocatorContext;
    void* packInfo;
    int width;
    int height;
    int strideInBytes;
    int padding;
    int skipMissing;
    int hOversample;
    int vOversample;
    char* pixels;
    void* nodes;
} stbtt_pack_context;

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.

  • Field Details

    • LAYOUT

      public static final StructLayout LAYOUT
    • BYTES

      public static final long BYTES
    • PATH$userAllocatorContext

      public static final MemoryLayout.PathElement PATH$userAllocatorContext
    • PATH$packInfo

      public static final MemoryLayout.PathElement PATH$packInfo
    • PATH$width

      public static final MemoryLayout.PathElement PATH$width
    • PATH$height

      public static final MemoryLayout.PathElement PATH$height
    • PATH$strideInBytes

      public static final MemoryLayout.PathElement PATH$strideInBytes
    • PATH$padding

      public static final MemoryLayout.PathElement PATH$padding
    • PATH$skipMissing

      public static final MemoryLayout.PathElement PATH$skipMissing
    • PATH$hOversample

      public static final MemoryLayout.PathElement PATH$hOversample
    • PATH$vOversample

      public static final MemoryLayout.PathElement PATH$vOversample
    • PATH$pixels

      public static final MemoryLayout.PathElement PATH$pixels
    • PATH$nodes

      public static final MemoryLayout.PathElement PATH$nodes
    • LAYOUT$userAllocatorContext

      public static final AddressLayout LAYOUT$userAllocatorContext
    • LAYOUT$packInfo

      public static final AddressLayout LAYOUT$packInfo
    • LAYOUT$width

      public static final ValueLayout.OfInt LAYOUT$width
    • LAYOUT$height

      public static final ValueLayout.OfInt LAYOUT$height
    • LAYOUT$strideInBytes

      public static final ValueLayout.OfInt LAYOUT$strideInBytes
    • LAYOUT$padding

      public static final ValueLayout.OfInt LAYOUT$padding
    • LAYOUT$skipMissing

      public static final ValueLayout.OfInt LAYOUT$skipMissing
    • LAYOUT$hOversample

      public static final ValueLayout.OfInt LAYOUT$hOversample
    • LAYOUT$vOversample

      public static final ValueLayout.OfInt LAYOUT$vOversample
    • LAYOUT$pixels

      public static final AddressLayout LAYOUT$pixels
    • LAYOUT$nodes

      public static final AddressLayout LAYOUT$nodes
    • SIZE$userAllocatorContext

      public static final long SIZE$userAllocatorContext
    • SIZE$packInfo

      public static final long SIZE$packInfo
    • SIZE$width

      public static final long SIZE$width
    • SIZE$height

      public static final long SIZE$height
    • SIZE$strideInBytes

      public static final long SIZE$strideInBytes
    • SIZE$padding

      public static final long SIZE$padding
    • SIZE$skipMissing

      public static final long SIZE$skipMissing
    • SIZE$hOversample

      public static final long SIZE$hOversample
    • SIZE$vOversample

      public static final long SIZE$vOversample
    • SIZE$pixels

      public static final long SIZE$pixels
    • SIZE$nodes

      public static final long SIZE$nodes
    • OFFSET$userAllocatorContext

      public static final long OFFSET$userAllocatorContext
    • OFFSET$packInfo

      public static final long OFFSET$packInfo
    • OFFSET$width

      public static final long OFFSET$width
    • OFFSET$height

      public static final long OFFSET$height
    • OFFSET$strideInBytes

      public static final long OFFSET$strideInBytes
    • OFFSET$padding

      public static final long OFFSET$padding
    • OFFSET$skipMissing

      public static final long OFFSET$skipMissing
    • OFFSET$hOversample

      public static final long OFFSET$hOversample
    • OFFSET$vOversample

      public static final long OFFSET$vOversample
    • OFFSET$pixels

      public static final long OFFSET$pixels
    • OFFSET$nodes

      public static final long OFFSET$nodes
  • Constructor Details

    • STBTT_PackContext

      public STBTT_PackContext(@NotNull @NotNull MemorySegment segment)
      Creates an instance of a STBTT_PackContext record class.
      Parameters:
      segment - the value for the segment record component
  • Method Details