MPLABĀ® Harmony Graphics Suite
GFX v3.13.0
Legato API Documentation
|
General internal utilities for the library. More...
#include "gfx/legato/common/legato_common.h"
#include "gfx/legato/common/legato_color.h"
#include "gfx/legato/core/legato_scheme.h"
Go to the source code of this file.
Macros | |
#define | LE_TEST_FLAG(val, flag) ((val & flag) > 0) |
Typedefs | |
typedef struct leWidget | leWidget |
Used to define a widget. More... | |
typedef struct leList | leList |
Functions | |
leWidget * | leUtils_PickFromWidget (const leWidget *wgt, int32_t x, int32_t y) |
Finds the top-most visible widget in a layer at the given coordinates. More... | |
void | leUtils_PointToScreenSpace (const leWidget *widget, lePoint *pnt) |
Converts a point from widget space into screen space. More... | |
void | leUtils_PointScreenToLocalSpace (const leWidget *widget, lePoint *pnt) |
Convert point from layer space into the local space of a widget. More... | |
void | leUtils_ClipRectToParent (const leWidget *widget, leRect *rect) |
Clips a rectangle to the parent of a widge. More... | |
void | leUtils_RectToParentSpace (const leWidget *widget, leRect *rect) |
Convert rectangle from widget local space to widget parent space. More... | |
void | leUtils_RectFromParentSpace (const leWidget *widget, leRect *rect) |
Convert rectangle from widget parent space to widget local space. More... | |
void | leUtils_RectToScreenSpace (const leWidget *widget, leRect *rect) |
Convert rectangle from widget local space to screen space. More... | |
leBool | leUtils_ChildIntersectsParent (const leWidget *parent, const leWidget *child) |
Determines if parent and child intersect. More... | |
void | leUtils_ClipRectToAncestors (const leWidget *wgt, struct leRect *rct) |
Clips a widget's rectangle to the widget tree hierarchy. More... | |
leWidget * | leUtils_GetNextHighestWidget (const leWidget *wgt) |
Get next highest Z order widget in the tree from 'wgt'. More... | |
void | leUtils_ArrangeRectangle (leRect *sub, leRect obj, leRect bounds, leHAlignment hAlignment, leVAlignment vAlignment, leRelativePosition position, uint8_t leftMargin, uint8_t topMargin, uint8_t rightMargin, uint8_t bottomMargin, uint16_t rectMargin) |
Calculates the position of a rectangle within the given bound. More... | |
void | leUtils_ArrangeRectangleRelative (leRect *sub, leRect obj, leRect bounds, leHAlignment hAlignment, leVAlignment vAlignment, leRelativePosition position, uint8_t leftMargin, uint8_t topMargin, uint8_t rightMargin, uint8_t bottomMargin, uint16_t rectMargin) |
Calculates the position of a rectangle within the given bounds. More... | |
void | leUtils_PointLogicalToScratch (int16_t *x, int16_t *y) |
void | leUtils_RectLogicalToScratch (leRect *rect) |
const leBlendLookupTable * | leUtils_GetSchemeLookupTable (const leScheme *schm, leColor foreground, leColor background) |
General internal utilities for the library.
void leUtils_ArrangeRectangle | ( | leRect * | sub, |
leRect | obj, | ||
leRect | bounds, | ||
leHAlignment | hAlignment, | ||
leVAlignment | vAlignment, | ||
leRelativePosition | position, | ||
uint8_t | leftMargin, | ||
uint8_t | topMargin, | ||
uint8_t | rightMargin, | ||
uint8_t | bottomMargin, | ||
uint16_t | rectMargin | ||
) |
Calculates the position of a rectangle within the given bound.
Calculates the position of a rectangle within the given bounds and in accordance with the given parameters. A use case for this is when an image and a text rectangle must be arranged in a button box. This version of the algorithm will calculate the location of the image rectangle.
widget | position. |
rect | position. |
void leUtils_ArrangeRectangleRelative | ( | leRect * | sub, |
leRect | obj, | ||
leRect | bounds, | ||
leHAlignment | hAlignment, | ||
leVAlignment | vAlignment, | ||
leRelativePosition | position, | ||
uint8_t | leftMargin, | ||
uint8_t | topMargin, | ||
uint8_t | rightMargin, | ||
uint8_t | bottomMargin, | ||
uint16_t | rectMargin | ||
) |
Calculates the position of a rectangle within the given bounds.
Calculates the position of a rectangle within the given bounds and in accordance with the given parameters. A use case for this is when an image and a text rectangle must be arranged in a button box. This version of the algorithm will calculate the location of the image rectangle.
widget | position. |
rect | position. |
Determines if parent and child intersect.
Determines if parent and child intersects.
widget | the parent widget. |
child | the child widget. |
Clips a widget's rectangle to the widget tree hierarchy.
Clips a widget's rectangle to the widget tree hierarchy
widget | the parent widget. |
result | the clipped rectangle |
Clips a rectangle to the parent of a widge.
Clips a rectangle rect to parent of widget.
widget | position. |
rect | position. |
Get next highest Z order widget in the tree from 'wgt'.
Gets the next the highest Z order widget in the tree widget.
widget | position. |
rect | position. |
Finds the top-most visible widget in a layer at the given coordinates.
Finds the top-most visible widget in wgt at the given coordinates x and y.
wgt | the widget to pick from |
x | position. |
y | position. |
Convert point from layer space into the local space of a widget.
Converts pnt corresponding to layer space to widget space.
widget | position. |
pnt | position. |
Converts a point from widget space into screen space.
Converts point corresponding to widget space to screen space.
widget | the subject widget. |
pnt | the point to convert. |
Convert rectangle from widget parent space to widget local space.
Converts rect to widget space.
widget | position. |
rect | position. |
Convert rectangle from widget local space to widget parent space.
Converts rect from widget space to parent space.
widget | position. |
rect | position. |
Convert rectangle from widget local space to screen space.
Converts rect from widget space to screen space.
widget | position. |
rect | position. |