diff options
Diffstat (limited to 'src/draw/sw')
-rw-r--r-- | src/draw/sw/blend/lv_draw_sw_blend_private.h | 4 | ||||
-rw-r--r-- | src/draw/sw/lv_draw_sw.h | 11 | ||||
-rw-r--r-- | src/draw/sw/lv_draw_sw_gradient.h | 2 | ||||
-rw-r--r-- | src/draw/sw/lv_draw_sw_mask.h | 12 | ||||
-rw-r--r-- | src/draw/sw/lv_draw_sw_mask_private.h | 41 |
5 files changed, 37 insertions, 33 deletions
diff --git a/src/draw/sw/blend/lv_draw_sw_blend_private.h b/src/draw/sw/blend/lv_draw_sw_blend_private.h index 9582049e6..532f4c966 100644 --- a/src/draw/sw/blend/lv_draw_sw_blend_private.h +++ b/src/draw/sw/blend/lv_draw_sw_blend_private.h @@ -33,14 +33,14 @@ extern "C" { struct lv_draw_sw_blend_dsc_t { const lv_area_t * blend_area; /**< The area with absolute coordinates to draw on `layer->buf` * will be clipped to `layer->clip_area` */ - const void * src_buf; /**< Pointer to an image to blend. If set `fill_color` is ignored */ + const void * src_buf; /**< Pointer to an image to blend. If set `fill_color` is ignored */ uint32_t src_stride; lv_color_format_t src_color_format; const lv_area_t * src_area; lv_opa_t opa; /**< The overall opacity*/ lv_color_t color; /**< Fill color*/ const lv_opa_t * mask_buf; /**< NULL if ignored, or an alpha mask to apply on `blend_area`*/ - lv_draw_sw_mask_res_t mask_res; /**< The result of the previous mask operation */ + lv_draw_sw_mask_res_t mask_res; /**< The result of the previous mask operation */ const lv_area_t * mask_area; /**< The area of `mask_buf` with absolute coordinates*/ int32_t mask_stride; lv_blend_mode_t blend_mode; /**< E.g. LV_BLEND_MODE_ADDITIVE*/ diff --git a/src/draw/sw/lv_draw_sw.h b/src/draw/sw/lv_draw_sw.h index 9e51ea286..bd00769e4 100644 --- a/src/draw/sw/lv_draw_sw.h +++ b/src/draw/sw/lv_draw_sw.h @@ -69,7 +69,7 @@ void lv_draw_sw_box_shadow(lv_draw_unit_t * draw_unit, const lv_draw_box_shadow_ /** * Draw an image with SW render. It handles image decoding, tiling, transformations, and recoloring. * @param draw_unit pointer to a draw unit - * @param dsc the draw descriptor + * @param draw_dsc the draw descriptor * @param coords the coordinates of the image */ void lv_draw_sw_image(lv_draw_unit_t * draw_unit, const lv_draw_image_dsc_t * draw_dsc, @@ -101,7 +101,7 @@ void lv_draw_sw_line(lv_draw_unit_t * draw_unit, const lv_draw_line_dsc_t * dsc) /** * Blend a layer with SW render * @param draw_unit pointer to a draw unit - * @param dsc the draw descriptor + * @param draw_dsc the draw descriptor * @param coords the coordinates of the layer */ void lv_draw_sw_layer(lv_draw_unit_t * draw_unit, const lv_draw_image_dsc_t * draw_dsc, const lv_area_t * coords); @@ -124,12 +124,12 @@ void lv_draw_sw_mask_rect(lv_draw_unit_t * draw_unit, const lv_draw_mask_rect_ds /** * Used internally to get a transformed are of an image * @param draw_unit pointer to a draw unit - * @param dest_area the area to calculate, i.e. get this area from the transformed image - * @param src_buf the source buffer + * @param dest_area area to calculate, i.e. get this area from the transformed image + * @param src_buf source buffer * @param src_w source buffer width in pixels * @param src_h source buffer height in pixels * @param src_stride source buffer stride in bytes - * @param dsc the draw descriptor + * @param draw_dsc draw descriptor * @param sup supplementary data * @param cf color format of the source buffer * @param dest_buf the destination buffer @@ -151,6 +151,7 @@ void lv_draw_sw_vector(lv_draw_unit_t * draw_unit, const lv_draw_vector_task_dsc * Swap the upper and lower byte of an RGB565 buffer. * Might be required if a 8bit parallel port or an SPI port send the bytes in the wrong order. * The bytes will be swapped in place. + * @param buf pointer to buffer * @param buf_size_px number of pixels in the buffer */ void lv_draw_sw_rgb565_swap(void * buf, uint32_t buf_size_px); diff --git a/src/draw/sw/lv_draw_sw_gradient.h b/src/draw/sw/lv_draw_sw_gradient.h index a0bec58e1..647affc97 100644 --- a/src/draw/sw/lv_draw_sw_gradient.h +++ b/src/draw/sw/lv_draw_sw_gradient.h @@ -44,6 +44,8 @@ typedef lv_color_t lv_grad_color_t; * @param dsc The gradient descriptor to use * @param range The range to use in computation. * @param frac The current part used in the range. frac is in [0; range] + * @param color_out ??? + * @param opa_out ??? */ void /* LV_ATTRIBUTE_FAST_MEM */ lv_gradient_color_calculate(const lv_grad_dsc_t * dsc, int32_t range, diff --git a/src/draw/sw/lv_draw_sw_mask.h b/src/draw/sw/lv_draw_sw_mask.h index 22a0d6700..3f7b306e4 100644 --- a/src/draw/sw/lv_draw_sw_mask.h +++ b/src/draw/sw/lv_draw_sw_mask.h @@ -119,15 +119,15 @@ void lv_draw_sw_mask_line_points_init(lv_draw_sw_mask_line_param_t * param, int3 /** *Initialize a line mask from a point and an angle. - * @param param pointer to a `lv_draw_mask_param_t` to initialize - * @param px X coordinate of a point of the line - * @param py X coordinate of a point of the line - * @param angle right 0 deg, bottom: 90 - * @param side and element of `lv_draw_mask_line_side_t` to describe which side to keep. + * @param param pointer to a `lv_draw_mask_param_t` to initialize + * @param px X coordinate of a point of the line + * @param py X coordinate of a point of the line + * @param angle right 0 deg, bottom: 90 + * @param side an element of `lv_draw_mask_line_side_t` to describe which side to keep. * With `LV_DRAW_MASK_LINE_SIDE_LEFT/RIGHT` and horizontal line all pixels are kept * With `LV_DRAW_MASK_LINE_SIDE_TOP/BOTTOM` and vertical line all pixels are kept */ -void lv_draw_sw_mask_line_angle_init(lv_draw_sw_mask_line_param_t * param, int32_t p1x, int32_t py, int16_t angle, +void lv_draw_sw_mask_line_angle_init(lv_draw_sw_mask_line_param_t * param, int32_t px, int32_t py, int16_t angle, lv_draw_sw_mask_line_side_t side); /** diff --git a/src/draw/sw/lv_draw_sw_mask_private.h b/src/draw/sw/lv_draw_sw_mask_private.h index a749ac745..44d3f87d5 100644 --- a/src/draw/sw/lv_draw_sw_mask_private.h +++ b/src/draw/sw/lv_draw_sw_mask_private.h @@ -26,20 +26,21 @@ extern "C" { typedef struct { uint8_t * buf; - lv_opa_t * cir_opa; /*Opacity of values on the circumference of an 1/4 circle*/ - uint16_t * x_start_on_y; /*The x coordinate of the circle for each y value*/ - uint16_t * opa_start_on_y; /*The index of `cir_opa` for each y value*/ - int32_t life; /*How many times the entry way used*/ - uint32_t used_cnt; /*Like a semaphore to count the referencing masks*/ - int32_t radius; /*The radius of the entry*/ + lv_opa_t * cir_opa; /**< Opacity of values on the circumference of an 1/4 circle */ + uint16_t * x_start_on_y; /**< The x coordinate of the circle for each y value */ + uint16_t * opa_start_on_y; /**< The index of `cir_opa` for each y value */ + int32_t life; /**< How many times the entry way used */ + uint32_t used_cnt; /**< Like a semaphore to count the referencing masks */ + int32_t radius; /**< The radius of the entry */ } lv_draw_sw_mask_radius_circle_dsc_t; + struct lv_draw_sw_mask_common_dsc_t { lv_draw_sw_mask_xcb_t cb; lv_draw_sw_mask_type_t type; }; struct lv_draw_sw_mask_line_param_t { - /*The first element must be the common descriptor*/ + /** The first element must be the common descriptor */ lv_draw_sw_mask_common_dsc_t dsc; struct { @@ -53,31 +54,31 @@ struct lv_draw_sw_mask_line_param_t { lv_draw_sw_mask_line_side_t side : 2; } cfg; - /*A point of the line*/ + /** A point of the line */ lv_point_t origo; - /*X / (1024*Y) steepness (X is 0..1023 range). What is the change of X in 1024 Y?*/ + /** X / (1024*Y) steepness (X is 0..1023 range). What is the change of X in 1024 Y? */ int32_t xy_steep; - /*Y / (1024*X) steepness (Y is 0..1023 range). What is the change of Y in 1024 X?*/ + /** Y / (1024*X) steepness (Y is 0..1023 range). What is the change of Y in 1024 X? */ int32_t yx_steep; - /*Helper which stores yx_steep for flat lines and xy_steep for steep (non flat) lines*/ + /** Helper which stores yx_steep for flat lines and xy_steep for steep (non flat) lines */ int32_t steep; - /*Steepness in 1 px in 0..255 range. Used only by flat lines.*/ + /** Steepness in 1 px in 0..255 range. Used only by flat lines. */ int32_t spx; - /*1: It's a flat line? (Near to horizontal)*/ + /** 1: It's a flat line? (Near to horizontal) */ uint8_t flat : 1; - /*Invert the mask. The default is: Keep the left part. - *It is used to select left/right/top/bottom*/ + /** Invert the mask. The default is: Keep the left part. + *It is used to select left/right/top/bottom */ uint8_t inv: 1; }; struct lv_draw_sw_mask_angle_param_t { - /*The first element must be the common descriptor*/ + /** The first element must be the common descriptor */ lv_draw_sw_mask_common_dsc_t dsc; struct { @@ -92,13 +93,13 @@ struct lv_draw_sw_mask_angle_param_t { }; struct lv_draw_sw_mask_radius_param_t { - /*The first element must be the common descriptor*/ + /** The first element must be the common descriptor */ lv_draw_sw_mask_common_dsc_t dsc; struct { lv_area_t rect; int32_t radius; - /*Invert the mask. 0: Keep the pixels inside.*/ + /** Invert the mask. 0: Keep the pixels inside. */ uint8_t outer: 1; } cfg; @@ -106,7 +107,7 @@ struct lv_draw_sw_mask_radius_param_t { }; struct lv_draw_sw_mask_fade_param_t { - /*The first element must be the common descriptor*/ + /** The first element must be the common descriptor */ lv_draw_sw_mask_common_dsc_t dsc; struct { @@ -120,7 +121,7 @@ struct lv_draw_sw_mask_fade_param_t { }; struct lv_draw_sw_mask_map_param_t { - /*The first element must be the common descriptor*/ + /** The first element must be the common descriptor */ lv_draw_sw_mask_common_dsc_t dsc; struct { |