Package com.raylib
Class Font
java.lang.Object
com.raylib.Font
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal MemorySegment
The native FFI MemorySegment that holds the data this object wraps. -
Constructor Summary
ConstructorsConstructorDescriptionFont()
Construct with auto memory allocator and fields initialized to zero.Font
(int baseSize, int glyphCount, int glyphPadding, Texture texture, Rectangle recs, GlyphInfo glyphs) Construct with auto memory allocator and fields initialized as specifiedFont
(MemorySegment memorySegment) Construct by wrapping around an already allocated MemorySegment, perhaps from another objectFont
(SegmentAllocator arena) Construct with your owm memory allocator and fields not initializedFont
(SegmentAllocator arena, int baseSize, int glyphCount, int glyphPadding, Texture texture, Rectangle recs, GlyphInfo glyphs) Construct with your own memory allocator and fields initialized as specified -
Method Summary
Modifier and TypeMethodDescriptionstatic Font
allocateArray
(long elementCount) Allocate an array of Fontstatic Font
allocateArray
(long elementCount, SegmentAllocator allocator) Allocate an array of Fontboolean
Equality is tested on basis of both wrapper objects must refer to same native memory location to be considered equalgetArrayElement
(int index) int
Base size (default chars height)int
Number of glyph charactersint
Padding around the glyph charactersGlyphs info datagetRecs()
Rectangles in texture for the glyphsTexture atlas containing the glyphsint
hashCode()
setBaseSize
(int value) Base size (default chars height)setGlyphCount
(int value) Number of glyph characterssetGlyphPadding
(int value) Padding around the glyph charactersGlyphs info dataRectangles in texture for the glyphssetTexture
(Texture value) Texture atlas containing the glyphs
-
Field Details
-
memorySegment
The native FFI MemorySegment that holds the data this object wraps.
-
-
Constructor Details
-
Font
public Font()Construct with auto memory allocator and fields initialized to zero. -
Font
Construct with your owm memory allocator and fields not initialized -
Font
Construct by wrapping around an already allocated MemorySegment, perhaps from another object -
Font
public Font(int baseSize, int glyphCount, int glyphPadding, Texture texture, Rectangle recs, GlyphInfo glyphs) Construct with auto memory allocator and fields initialized as specified- Parameters:
baseSize
- Base size (default chars height)glyphCount
- Number of glyph charactersglyphPadding
- Padding around the glyph characterstexture
- Texture atlas containing the glyphsrecs
- Rectangles in texture for the glyphsglyphs
- Glyphs info data
-
Font
public Font(SegmentAllocator arena, int baseSize, int glyphCount, int glyphPadding, Texture texture, Rectangle recs, GlyphInfo glyphs) Construct with your own memory allocator and fields initialized as specified- Parameters:
baseSize
- Base size (default chars height)glyphCount
- Number of glyph charactersglyphPadding
- Padding around the glyph characterstexture
- Texture atlas containing the glyphsrecs
- Rectangles in texture for the glyphsglyphs
- Glyphs info data
-
-
Method Details
-
equals
-
hashCode
-
getArrayElement
-
allocateArray
Allocate an array of Font -
allocateArray
Allocate an array of Font -
getBaseSize
public int getBaseSize()Base size (default chars height) -
setBaseSize
Base size (default chars height) -
getGlyphCount
public int getGlyphCount()Number of glyph characters -
setGlyphCount
Number of glyph characters -
getGlyphPadding
public int getGlyphPadding()Padding around the glyph characters -
setGlyphPadding
Padding around the glyph characters -
getTexture
Texture atlas containing the glyphs -
setTexture
-
getRecs
Rectangles in texture for the glyphs -
setRecs
-
getGlyphs
Glyphs info data -
setGlyphs
-