lv_draw_sw_grad.h
API reference for lv_draw_sw_grad.h
Functions
lv_draw_sw_grad_get
Get a gradient cache from the given parameters
lv_draw_sw_grad_calc_t * lv_draw_sw_grad_get(const lv_grad_dsc_t *gradient, int32_t w, int32_t h)| Name | Type |
|---|---|
gradient | const lv_grad_dsc_t * |
w | int32_t |
h | int32_t |
lv_draw_sw_grad_linear_get_line
Calculate a line segment of a linear gradient
void lv_draw_sw_grad_linear_get_line(lv_grad_dsc_t *dsc, int32_t xp, int32_t yp, int32_t width, lv_draw_sw_grad_calc_t *result)| Name | Type | Description |
|---|---|---|
dsc | lv_grad_dsc_t * | gradient descriptor |
xp | int32_t | starting point x coordinate in gradient space |
yp | int32_t | starting point y coordinate in gradient space |
width | int32_t | width of the line segment in pixels |
result | lv_draw_sw_grad_calc_t * | color buffer for the resulting line segment |
lv_draw_sw_grad_radial_get_line
Calculate a line segment of a radial gradient
void lv_draw_sw_grad_radial_get_line(lv_grad_dsc_t *dsc, int32_t xp, int32_t yp, int32_t width, lv_draw_sw_grad_calc_t *result)| Name | Type | Description |
|---|---|---|
dsc | lv_grad_dsc_t * | gradient descriptor |
xp | int32_t | starting point x coordinate in gradient space |
yp | int32_t | starting point y coordinate in gradient space |
width | int32_t | width of the line segment in pixels |
result | lv_draw_sw_grad_calc_t * | color buffer for the resulting line segment |
lv_draw_sw_grad_conical_get_line
Calculate a line segment of a conical gradient
void lv_draw_sw_grad_conical_get_line(lv_grad_dsc_t *dsc, int32_t xp, int32_t yp, int32_t width, lv_draw_sw_grad_calc_t *result)| Name | Type | Description |
|---|---|---|
dsc | lv_grad_dsc_t * | gradient descriptor |
xp | int32_t | starting point x coordinate in gradient space |
yp | int32_t | starting point y coordinate in gradient space |
width | int32_t | width of the line segment in pixels |
result | lv_draw_sw_grad_calc_t * | color buffer for the resulting line segment |
lv_draw_sw_grad_color_calculate
Compute the color in the given gradient and fraction Gradient are specified in a virtual [0-255] range, so this function scales the virtual range to the given range
void lv_draw_sw_grad_color_calculate(const lv_grad_dsc_t *dsc, int32_t range, int32_t frac, lv_color_t *color_out, lv_opa_t *opa_out)| Name | Type | Description |
|---|---|---|
dsc | const lv_grad_dsc_t * | The gradient descriptor to use |
range | int32_t | The range to use in computation. |
frac | int32_t | The current part used in the range. frac is in [0; range] |
color_out | lv_color_t * | Calculated gradient color |
opa_out | lv_opa_t * | Calculated opacity |
lv_draw_sw_grad_cleanup
Clean up the gradient item after it was get with lv_grad_get_from_cache.
void lv_draw_sw_grad_cleanup(lv_draw_sw_grad_calc_t *grad)| Name | Type | Description |
|---|---|---|
grad | lv_draw_sw_grad_calc_t * | pointer to a gradient |
lv_draw_sw_grad_linear_setup
Calculate constants from the given parameters that are used during rendering
void lv_draw_sw_grad_linear_setup(lv_grad_dsc_t *dsc, const lv_area_t *coords)| Name | Type | Description |
|---|---|---|
dsc | lv_grad_dsc_t * | gradient descriptor |
coords | const lv_area_t * | the area where to draw the gradient |
lv_draw_sw_grad_linear_cleanup
Free up the allocated memory for the gradient calculation
void lv_draw_sw_grad_linear_cleanup(lv_grad_dsc_t *dsc)| Name | Type | Description |
|---|---|---|
dsc | lv_grad_dsc_t * | gradient descriptor |
lv_draw_sw_grad_radial_setup
Calculate constants from the given parameters that are used during rendering
void lv_draw_sw_grad_radial_setup(lv_grad_dsc_t *dsc, const lv_area_t *coords)| Name | Type | Description |
|---|---|---|
dsc | lv_grad_dsc_t * | gradient descriptor |
coords | const lv_area_t * | the area where to draw the gradient |
lv_draw_sw_grad_radial_cleanup
Free up the allocated memory for the gradient calculation
void lv_draw_sw_grad_radial_cleanup(lv_grad_dsc_t *dsc)| Name | Type | Description |
|---|---|---|
dsc | lv_grad_dsc_t * | gradient descriptor |
lv_draw_sw_grad_conical_setup
Calculate constants from the given parameters that are used during rendering
void lv_draw_sw_grad_conical_setup(lv_grad_dsc_t *dsc, const lv_area_t *coords)| Name | Type | Description |
|---|---|---|
dsc | lv_grad_dsc_t * | gradient descriptor |
coords | const lv_area_t * | the area where to draw the gradient |
lv_draw_sw_grad_conical_cleanup
Free up the allocated memory for the gradient calculation
void lv_draw_sw_grad_conical_cleanup(lv_grad_dsc_t *dsc)| Name | Type | Description |
|---|---|---|
dsc | lv_grad_dsc_t * | gradient descriptor |
Structs
lv_draw_sw_grad_calc_t
| Member | Type | Description |
|---|---|---|
color_map | lv_color_t * | |
opa_map | lv_opa_t * | |
size | uint32_t |
Used by 4 functions
lv_draw_sw_grad_cleanup— paramgradlv_draw_sw_grad_linear_get_line— paramresultlv_draw_sw_grad_radial_get_line— paramresultlv_draw_sw_grad_conical_get_line— paramresult
Dependencies
Last updated on