Function in ldk_texture_atlas.h

ldk_texture_atlas_grid_append

Add a grid of regions to the atlas.

LDK_API bool ldk_texture_atlas_grid_append(
 LDKTextureAtlas *atlas,
 u32 image_width,
 u32 image_height,
 u32 cell_width,
 u32 cell_height,
 u32 spacing_x,
 u32 spacing_y,
 u32 margin_x,
 u32 margin_y
);

Parameters

LDKTextureAtlas *atlas
Texture atlas being inspected or modified.
u32 image_width
Image width used by this operation.
u32 image_height
Image height used by this operation.
u32 cell_width
Cell width used by this operation.
u32 cell_height
Cell height used by this operation.
u32 spacing_x
Spacing x used by this operation.
u32 spacing_y
Spacing y used by this operation.
u32 margin_x
Margin x used by this operation.
u32 margin_y
Margin y used by this operation.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_texture_atlas.h

ldk_texture_atlas_texture_set

Set the texture atlas texture.

LDK_API bool ldk_texture_atlas_texture_set(
 LDKTextureAtlas *atlas,
 const char *path
);

Parameters

LDKTextureAtlas *atlas
Texture atlas being inspected or modified.
const char *path
Path identifying the file or resource.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_texture_atlas.h

ldk_texture_atlas_validate

Validate the texture atlas.

LDK_API bool ldk_texture_atlas_validate(const LDKTextureAtlas *atlas);

Parameters

const LDKTextureAtlas *atlas
Texture atlas being inspected or modified.

Returns

True if the operation succeeds; false otherwise.