diff options
Diffstat (limited to 'src/gwin')
-rw-r--r-- | src/gwin/frame.h | 5 | ||||
-rw-r--r-- | src/gwin/gimage.h | 2 | ||||
-rw-r--r-- | src/gwin/gwin.c | 5 | ||||
-rw-r--r-- | src/gwin/sys_defs.h | 17 |
4 files changed, 25 insertions, 4 deletions
diff --git a/src/gwin/frame.h b/src/gwin/frame.h index bf7cd2d8..fc5daf8e 100644 --- a/src/gwin/frame.h +++ b/src/gwin/frame.h @@ -45,8 +45,7 @@ typedef struct GFrameObject { /** * @brief Create a frame widget * - * @details This widget provides a window like we know it from desktop systems. You usually use this together with - * gwinAddChild(). + * @details This widget provides a window like we know it from desktop systems. * * @param[in] g The GDisplay to display this window on * @param[in] fo The GFrameObject structure to initialize. If this is NULL the structure is dynamically allocated. @@ -54,7 +53,7 @@ typedef struct GFrameObject { * @param[in] flags Some flags, see notes. * * @note Possible flags are: GWIN_FRAME_BORDER, GWIN_FRAME_CLOSE_BTN, GWIN_FRAME_MINMAX_BTN. - * Whether the close or the minimize maximize buttons are used, the boarder is automatically invoked. + * When the close or the minimize/maximize buttons are used, the boarder is automatically invoked. * @note These frame buttons are processed internally. The close button will invoke a gwinDestroy() which will * destroy the window itself and EVERY child it contains (also children of children). * diff --git a/src/gwin/gimage.h b/src/gwin/gimage.h index 670a9ec4..0052f024 100644 --- a/src/gwin/gimage.h +++ b/src/gwin/gimage.h @@ -9,7 +9,7 @@ * @file src/gwin/gimage.h * @brief GWIN image widget header file. * - * @defgroup Image Image + * @defgroup ImageBox ImageBox * @ingroup Widgets * * @details GWIN allos it to create an image widget. The widget diff --git a/src/gwin/gwin.c b/src/gwin/gwin.c index e1625b13..ee0a7222 100644 --- a/src/gwin/gwin.c +++ b/src/gwin/gwin.c @@ -344,6 +344,11 @@ void gwinBlitArea(GHandle gh, coord_t x, coord_t y, coord_t cx, coord_t cy, coor gdispGFillConvexPoly(gh->display, tx+gh->x, ty+gh->y, pntarray, cnt, gh->color); _gwinDrawEnd(gh); } + void gwinDrawThickLine(GHandle gh, coord_t x0, coord_t y0, coord_t x1, coord_t y1, coord_t width, bool_t round) { + if (!_gwinDrawStart(gh)) return; + gdispGDrawThickLine(gh->display, gh->x+x0, gh->y+y0, gh->x+x1, gh->y+y1, gh->color, width, round); + _gwinDrawEnd(gh); + } #endif #if GDISP_NEED_IMAGE diff --git a/src/gwin/sys_defs.h b/src/gwin/sys_defs.h index 830827b2..4b103d11 100644 --- a/src/gwin/sys_defs.h +++ b/src/gwin/sys_defs.h @@ -892,6 +892,23 @@ extern "C" { * @api */ void gwinFillConvexPoly(GHandle gh, coord_t tx, coord_t ty, const point *pntarray, unsigned cnt); + + /** + * @brief Draw a thick line in the window + * @details The line thickness is specified in pixels. The line ends can + * be selected to be either flat or round. + * @note Uses gdispGFillConvexPoly() internally to perform the drawing. + * @note Uses the current foreground color to draw the line + * + * @param[in] gh The window handle + * @param[in] x0,y0 The start position + * @param[in] x1,y1 The end position + * @param[in] width The width of the line + * @param[in] round Use round ends for the line + * + * @api + */ + void gwinDrawThickLine(GHandle gh, coord_t x0, coord_t y0, coord_t x1, coord_t y1, coord_t width, bool_t round); #endif /*------------------------------------------------- |