50 #ifndef LEGATO_RECTARRAY_H 51 #define LEGATO_RECTARRAY_H 344 #if LE_SCRATCH_BUFFER_PADDING == 1 This struct represents a rectange array.
Definition: legato_rectarray.h:74
leResult leRectArray_Destroy(leRectArray *arr)
Destroy array.
Definition: legato_rectarray.c:240
uint32_t size
Definition: legato_rectarray.h:77
uint32_t capacity
Definition: legato_rectarray.h:78
Common macros and definitions used by Legato.
leResult leRectArray_Resize(leRectArray *arr, uint32_t sz)
Resizes the capacity of the array.
Definition: legato_rectarray.c:94
leResult leRectArray_CropToSizeX(leRectArray *arr, uint32_t size)
Slices an array of rectangles to a given pixel count.
Definition: legato_rectarray.c:564
leResult leRectArray_SortBySize(leRectArray *arr)
Sorts a given array.
Definition: legato_rectarray.c:281
leResult leRectArray_PushFront(leRectArray *arr, const leRect *rect)
Pushes a new rectangle onto the front of the array.
Definition: legato_rectarray.c:121
leResult leRectArray_PopBack(leRectArray *arr)
Removes the last rectangle from the array.
Definition: legato_rectarray.c:166
leResult leRectArray_InsertAt(leRectArray *arr, uint32_t idx, const leRect *rect)
Inserts a rectangle into an array at a given index.
Definition: legato_rectarray.c:176
leResult leRectArray_Copy(leRectArray *src, leRectArray *dest)
Copy array.
Definition: legato_rectarray.c:209
leResult leRectArray_CropToArea(leRectArray *arr, uint32_t width, uint32_t height)
Crops rectange by width and height.
Definition: legato_rectarray.c:492
leResult
This enum represents function call results.
Definition: legato_common.h:123
leResult leRectArray_MergeSimilar(leRectArray *arr)
Merge rectangles.
Definition: legato_rectarray.c:371
leResult leRectArray_SortByY(leRectArray *arr)
Sort array by Y coordinate.
Definition: legato_rectarray.c:341
This struct represents a rectangle.
Definition: legato_common.h:394
leResult leRectArray_PopFront(leRectArray *arr)
Removes the first value from the array.
Definition: legato_rectarray.c:139
struct leRectArray leRectArray
This struct represents a rectange array.
leResult leRectArray_RemoveAt(leRectArray *arr, uint32_t idx)
Removes a rectangle from the array at an index.
Definition: legato_rectarray.c:199
leResult leRectArray_RemoveOverlapping(leRectArray *arr)
Remove overlappping rectangles.
Definition: legato_rectarray.c:395
leResult leRectArray_RemoveDuplicates(leRectArray *arr)
Removes any duplicate rectangles from an array.
Definition: legato_rectarray.c:258
leResult leRectArray_CropToSizeY(leRectArray *arr, uint32_t size)
Slices an array of rectangles to a given pixel count.
Definition: legato_rectarray.c:524
leResult leRectArray_SortByX(leRectArray *arr)
Sort array by X coordinate.
Definition: legato_rectarray.c:311
leResult leRectArray_PushBack(leRectArray *arr, const leRect *rect)
Push value on back.
Definition: legato_rectarray.c:149
leRect * rects
Definition: legato_rectarray.h:76
leResult leRectArray_Clear(leRectArray *arr)
Removes all values from a given array.
Definition: legato_rectarray.c:230
leResult leRectArray_Create(leRectArray *arr)
Creates a new rectangle.
Definition: legato_rectarray.c:82