Navigation
Unreal Engine C++ API Reference > Runtime > Engine > FTextureLayout
References
Module | Engine |
Header | /Engine/Source/Runtime/Engine/Public/TextureLayout.h |
Include | #include "TextureLayout.h" |
bool AddElement
(
uint32 & OutBaseX,
uint32 & OutBaseY,
uint32 ElementSizeX,
uint32 ElementSizeY
)
Remarks
Finds a free area in the texture large enough to contain a surface with the given size. If a large enough area is found, it is marked as in use, the output parameters OutBaseX and OutBaseY are set to the coordinates of the upper left corner of the free area and the function return true. Otherwise, the function returns false and OutBaseX and OutBaseY remain uninitialized. True if succeeded, false otherwise.
Parameters
Name | Description |
---|---|
OutBaseX | If the function succeeds, contains the X coordinate of the upper left corner of the free area on return. |
OutBaseY | If the function succeeds, contains the Y coordinate of the upper left corner of the free area on return. |
ElementSizeX | The size of the surface to allocate in horizontal pixels. |
ElementSizeY | The size of the surface to allocate in vertical pixels. |