 |
MPLABĀ® Harmony Graphics Suite
|
Go to the documentation of this file.
50 #ifndef LEGATO_RECTARRAY_H
51 #define LEGATO_RECTARRAY_H
Error functions, macros and definitions.
LIB_EXPORT leBool leRectsAreSimilar(const leRect *l, const leRect *r)
Determine if two rectanges are similar.
Definition: legato_rect.c:272
leResult
This enum represents function call results.
Definition: legato_common.h:134
This struct represents a rectangle.
Definition: legato_common.h:405
uint32_t capacity
Definition: legato_rectarray.h:74
struct leRectArray leRectArray
This struct represents a rectange array.
Memory functions and definitions.
leRect * rects
Definition: legato_rectarray.h:72
LIB_EXPORT leResult leRectArray_RemoveDuplicates(leRectArray *arr)
Removes any duplicate rectangles from an array.
Definition: legato_rectarray.c:258
LIB_EXPORT leResult leRectArray_PopFront(leRectArray *arr)
Removes the first value from the array.
Definition: legato_rectarray.c:139
LIB_EXPORT leResult leRectArray_MergeSimilar(leRectArray *arr)
Merge rectangles.
Definition: legato_rectarray.c:371
LIB_EXPORT leResult leRectArray_RemoveOverlapping(leRectArray *arr)
Remove overlappping rectangles.
Definition: legato_rectarray.c:393
LIB_EXPORT leResult leRectArray_RemoveAt(leRectArray *arr, uint32_t idx)
Removes a rectangle from the array at an index.
Definition: legato_rectarray.c:199
This struct represents a rectange array.
Definition: legato_rectarray.h:71
LIB_EXPORT leRect leRectCombine(const leRect *l_rect, const leRect *r_rect)
Combine rectangles.
Definition: legato_rect.c:61
LIB_EXPORT leResult leRectArray_CropToArea(leRectArray *arr, uint32_t width, uint32_t height)
Crops rectange by width and height.
Definition: legato_rectarray.c:415
LIB_EXPORT leResult leRectArray_PopBack(leRectArray *arr)
Removes the last rectangle from the array.
Definition: legato_rectarray.c:166
An array implementation for storing rectangles for the Legato user interface library.
LIB_EXPORT leResult leRectArray_Create(leRectArray *arr)
Creates a new rectangle.
Definition: legato_rectarray.c:82
LIB_EXPORT leBool leRectContainsRect(const leRect *l_rect, const leRect *r_rect)
Determines if a rectangle is completely inside another rectangle.
Definition: legato_rect.c:40
LIB_EXPORT leResult leRectArray_SortByX(leRectArray *arr)
Sort array by X coordinate.
Definition: legato_rectarray.c:311
LIB_EXPORT leResult leRectArray_SortByY(leRectArray *arr)
Sort array by Y coordinate.
Definition: legato_rectarray.c:341
LIB_EXPORT leResult leRectArray_Clear(leRectArray *arr)
Removes all values from a given array.
Definition: legato_rectarray.c:230
leResult leRectArray_CropToSizeX(leRectArray *arr, uint32_t size)
Slices an array of rectangles to a given pixel count.
Definition: legato_rectarray.c:487
Rectangle functions and definitions.
LIB_EXPORT 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
LIB_EXPORT leResult leRectArray_PushFront(leRectArray *arr, const leRect *rect)
Pushes a new rectangle onto the front of the array.
Definition: legato_rectarray.c:121
LIB_EXPORT leResult leRectArray_Resize(leRectArray *arr, uint32_t sz)
Resizes the capacity of the array.
Definition: legato_rectarray.c:94
LIB_EXPORT leResult leRectArray_Destroy(leRectArray *arr)
Destroy array.
Definition: legato_rectarray.c:240
uint32_t size
Definition: legato_rectarray.h:73
@ LE_TRUE
Definition: legato_common.h:159
LIB_EXPORT leResult leRectArray_SortBySize(leRectArray *arr)
Sorts a given array.
Definition: legato_rectarray.c:281
Common macros and definitions used by Legato.
LIB_EXPORT uint32_t leRectSplit(const leRect *sub, const leRect *obj, leRect res[4])
Split rectangles.
Definition: legato_rect.c:198
LIB_EXPORT leResult leRectArray_PushBack(leRectArray *arr, const leRect *rect)
Push value on back.
Definition: legato_rectarray.c:149
leResult leRectArray_CropToSizeY(leRectArray *arr, uint32_t size)
Slices an array of rectangles to a given pixel count.
Definition: legato_rectarray.c:447
LIB_EXPORT int32_t leRectCompare(const leRect *l, const leRect *r)
Determines if two rectangles are similar.
Definition: legato_rect.c:266
LIB_EXPORT leResult leRectArray_Copy(leRectArray *src, leRectArray *dest)
Copy array.
Definition: legato_rectarray.c:209