202 if(psz->
cx && psz->
cy)
276 if(psz->
cx && psz->
cy)
348 if(psz->
cx && psz->
cy)
431 if(psz->
cx && psz->
cy)
460 startColor = endColor;
467 for( ; y1 <= y2; y1++)
479 startColor = endColor;
485 for( ; x1 <= x2; x1++)
611 tmp_strDes.
pTab = pTab;
643 tmp_strDes.
pTab = pTab;
650 if(!psz->
cx || !psz->
cy)
653 if(tmp_txtHeight > psz->
cy)
656 if(tmp_txtWidth >= psz->
cx)
657 tmp_txtWidth = psz->
cx;
663 tmp_strDes.
x = ppt->
x;
664 tmp_strDes.
y = ppt->
y;
667 if(tmp_txtHeight != psz->
cy)
673 tmp_strDes.
y += (
D4D_COOR)(psz->
cy - tmp_txtHeight);
677 tmp_strDes.
y += (
D4D_COOR)((psz->
cy - tmp_txtHeight) / 2);
683 if(tmp_txtWidth != psz->
cx)
689 tmp_strDes.
x += (
D4D_COOR)(psz->
cx - tmp_txtWidth);
693 tmp_strDes.
x += (
D4D_COOR)((psz->
cx - tmp_txtWidth) / 2);
702 if(tmp_txtWidth != psz->
cx)
721 if(tmp_txtHeight != psz->
cy)
826 #pragma mark Drawing Round Corner Functions
830 #if D4D_ROUND_CORNER_ENABLE == D4D_TRUE
845 if(psz->
cx && psz->
cy)
922 if(psz->
cx && psz->
cy)
997 if(psz->
cx && psz->
cy)
1041 D4D_RBoxToXY(ppt->
x, ppt->
y, ltype, colorLine, colorFill, radius);
1063 D4D_LCD_RRect(d4d_curXY.
x, d4d_curXY.
y, x, y, ltype, colorLine, radius);
1148 if(psz->
cx && psz->
cy)
1181 startColor = endColor;
1188 for( ; y1 <= y2; y1++)
1196 else if((range - i) < radius)
1208 startColor = endColor;
1215 for( ; x1 <= x2; x1++)
1223 else if((range - i) < radius)
1292 if(line == 0)
return radius;
1296 if ((x != 0) && (y != 0))
1298 if(y == line)
return (
D4D_COOR)(radius - x);
1307 if(match && (x != x1_bf))
1317 if((radius - x) >= line)
1363 tmp_strDes.
pTab = pTab;
1370 if(tmp_txtWidth + radius >= psz->
cx)
1372 if(psz->
cx - radius > 0)
1378 tmp_strDes.
maxWidth = tmp_txtWidth;
1382 tmp_strDes.
x = ppt->
x;
1383 tmp_strDes.
y = ppt->
y;
1389 tmp_strDes.
y += (
D4D_COOR)(psz->
cy - tmp_txtHeight - radius / 2);
1393 tmp_strDes.
y += (
D4D_COOR)((psz->
cy - tmp_txtHeight) / 2);
1406 tmp_strDes.
x += (
D4D_COOR)(psz->
cx - tmp_txtWidth - radius / 2);
1410 tmp_strDes.
x += (
D4D_COOR) ((psz->
cx - tmp_txtWidth) / 2);
1431 tmp_Pos.x += psz->
cx - radius * 2 - 1;
1433 tmp_Pos.y += psz->
cy - radius * 2 - 1;
1435 tmp_Pos.x -= (psz->
cx - radius * 2 - 1);
1571 #if (D4D_ROUND_CORNER_ENABLE == D4D_FALSE) //if no Round corners
1603 shSize.
cx = psz->
cx;
1606 #if (D4D_ROUND_CORNER_ENABLE != D4D_FALSE) //if Round corners
1610 shPos.
x += psz->
cx - radius * 2 - 2;
1612 shPos.
y += psz->
cy - radius * 2 - 2;
1614 shPos.
x -= (psz->
cx - radius * 2 - 2);
1619 shSize.
cx -= radius * 2;
1631 shSize.
cy = psz->
cy;
1633 #if (D4D_ROUND_CORNER_ENABLE != D4D_FALSE) //if Round corners
1635 shSize.
cy -= radius * 2;
D4D_COLOR D4D_GetCrossColor(D4D_COLOR startColor, D4D_COLOR endColor, Byte value)
Compute cross color between two basic color in 256 steps.
void D4D_LCD_RBox(D4D_COOR x1, D4D_COOR y1, D4D_COOR x2, D4D_COOR y2, D4D_COLOR color, D4D_COOR radius)
#define D4D_BEVEL_BCKG_INTENSITY
D4D_BEVEL_BCKG_INTENSITY constant default declaration. Sets the percentual change of color for bevel ...
void D4D_RBoxTo(D4D_POINT *ppt, D4D_LINETYPE ltype, D4D_COLOR colorLine, D4D_COLOR colorFill, D4D_COOR radius)
Function draw filled rectangle with outline on the screen with round corners.
D4D_LINETYPE
Type definition of eGUI line type.
void D4D_RBox(D4D_POINT *ppt, D4D_SIZE *psz, D4D_LINETYPE ltype, D4D_COLOR colorLine, D4D_COLOR colorFill, D4D_COOR radius)
Function draw filled rectangle with outline on the screen with round corners.
void D4D_Quadrant(D4D_POINT *pCenter, D4D_COOR radius, D4D_LINETYPE ltype, D4D_COLOR color, D4D_QUADRANT quadrant)
Function draw quadrant of circle on the screen.
void D4D_BoxTo(D4D_POINT *ppt, D4D_LINETYPE ltype, D4D_COLOR colorLine, D4D_COLOR colorFill)
Function draw filled rectangle with outline on the screen.
#define D4D_OBJECT_F_FOCUSRECT
Object has an outlined rectangle.
void D4D_Box(D4D_POINT *ppt, D4D_SIZE *psz, D4D_LINETYPE ltype, D4D_COLOR colorLine, D4D_COLOR colorFill)
Function draw filled rectangle with outline on the screen.
D4D_FONT_TYPE * pFontType
#define D4D_ALIGN_V_CENTER_MASK
The vertical center aligment option mask (for texts and also bitmaps).
void D4D_RBoxXY(D4D_COOR x1, D4D_COOR y1, D4D_COOR x2, D4D_COOR y2, D4D_LINETYPE ltype, D4D_COLOR colorLine, D4D_COLOR colorFill, D4D_COOR radius)
Function draw filled rectangle with outline on the screen with round corners.
void D4D_DrawTextRRectTabToXY(D4D_COOR x, D4D_COOR y, D4D_STRING *buffText, D4D_TAB *pTab, D4D_COLOR colorText, D4D_COLOR colorBkgd, D4D_COOR radius)
Function draw text on XY coordination with TAB function in rectangle with round corners.
D4D_FONT_TYPE * D4D_GetFont(D4D_FONT ix)
D4D_TEXT_PROPERTIES text_properties
Text properties structure.
void D4D_FillRect(D4D_POINT *ppt, D4D_SIZE *psz, D4D_COLOR color)
Function draw filled rectangle on the screen.
D4D_INDEX printLen
Length of string that should be used (printed).
struct D4D_SCREEN_S * pScreen
pointer to object screen owner - it is placed in RAM bacause one object could be used in multiply scr...
Type definition of eGUI point structure.
void D4D_FillRectXY(D4D_COOR x1, D4D_COOR y1, D4D_COOR x2, D4D_COOR y2, D4D_COLOR color)
Function draw filled rectangle on the screen.
D4D_OBJECT_DATA_PTR pData
Pointer on runtime object data.
void D4D_FillRectColorScaleTo(D4D_POINT *ppt, D4D_COLOR startColor, D4D_COLOR endColor, D4D_DIRECTION direction)
Function draw filled rectangle with changing color (cross color from start to end color) on the scree...
void D4D_FillQuadrantXY(D4D_COOR x, D4D_COOR y, D4D_COOR radius, D4D_COLOR color, D4D_QUADRANT quadrant)
Function draw fill quadrant of circle on the screen.
#define D4D_FALSE
This is definition of boolean operation value in eGUI - FALSE.
The string type. This structure contains all properties about string in eGUI.
D4D_COOR D4D_DisplayHeight(void)
void D4D_BoxToXY(D4D_COOR x, D4D_COOR y, D4D_LINETYPE ltype, D4D_COLOR colorLine, D4D_COLOR colorFill)
Function draw filled rectangle with outline on the screen.
void D4D_DrawTextRectTab(D4D_POINT *ppt, D4D_SIZE *psz, D4D_STRING *buffText, D4D_TAB *pTab, D4D_COLOR colorText, D4D_COLOR colorBkgd)
Function draw text with TAB function in rectangle.
#define D4D_ALIGN_H_RIGHT_MASK
The horizontal right aligment option mask (for texts and also bitmaps).
void D4D_LCD_Line(D4D_COOR x1, D4D_COOR y1, D4D_COOR x2, D4D_COOR y2, D4D_LINETYPE line_type, D4D_COLOR color)
void D4D_LCD_Rect(D4D_COOR x1, D4D_COOR y1, D4D_COOR x2, D4D_COOR y2, D4D_LINETYPE line_type, D4D_COLOR color)
D4D_FONT_PROPERTIES properties
#define D4D_OBJECT_FLAGS2BEVEL(pObject)
Macro that gets the type of bevel from the object flags.
D4D_FONT fontId
index of used font
void D4D_RRectToXY(D4D_COOR x, D4D_COOR y, D4D_LINETYPE ltype, D4D_COLOR color, D4D_COOR radius)
Function draw rectangle on the screen with round corners.
void D4D_LCD_Box(D4D_COOR x1, D4D_COOR y1, D4D_COOR x2, D4D_COOR y2, D4D_COLOR color)
void D4D_MoveToXY(D4D_COOR x, D4D_COOR y)
Function move logic cursor to new position.
#define D4D_TRUE
This is definition of boolean operation value in eGUI - TRUE.
void D4D_DrawFrame(D4D_OBJECT *pObject, D4D_COLOR clrT, D4D_COLOR clrB)
Function draw standard object frame based on the object settings and current state.
void D4D_DrawTextRectTabTo(D4D_POINT *ppt, D4D_STRING *buffText, D4D_TAB *pTab, D4D_COLOR colorText, D4D_COLOR colorBkgd)
Function draw text on XY coordination with TAB function in rectangle.
void D4D_ClearScreen(D4D_COLOR color)
Function readraw complete screen by one color.
Third quadrant <180-270)
D4D Driver main header file.
D4D_OBJECT_FLAGS flags
runtime object flags
void D4D_Rect(D4D_POINT *ppt, D4D_SIZE *psz, D4D_LINETYPE ltype, D4D_COLOR color)
Function draw rectangle on the screen.
void D4D_FillRectColorScaleToXY(D4D_COOR x, D4D_COOR y, D4D_COLOR startColor, D4D_COLOR endColor, D4D_DIRECTION direction)
Function draw filled rectangle with changing color (cross color from start to end color) on the scree...
void D4D_DrawTextTabXY(D4D_COOR x, D4D_COOR y, D4D_STRING *buffText, D4D_TAB *pTab, D4D_COLOR colorText, D4D_COLOR colorBkgd)
Function draw text on XY coordination with TAB function.
void D4D_FillCircleXY(D4D_COOR x, D4D_COOR y, D4D_COOR r, D4D_COLOR color)
Function draw filled circle on the screen.
D4D_COOR D4D_GetTextBuffWidthTab(D4D_STRING *text_buffer, D4D_TAB *pTab)
The function returns width of text in pixels, also with tab table.
void D4D_RectTo(D4D_POINT *ppt, D4D_LINETYPE ltype, D4D_COLOR color)
Function draw rectangle on the screen.
D4D Driver private header file.
void D4D_FillRectTo(D4D_POINT *ppt, D4D_COLOR color)
Function draw filled rectangle on the screen.
void D4D_FillRRectToXY(D4D_COOR x, D4D_COOR y, D4D_COLOR color, D4D_COOR radius)
Function draw filled rectangle on the screen with round corners.
void D4D_DrawTextRRectTabXY(D4D_COOR x1, D4D_COOR y1, D4D_COOR x2, D4D_COOR y2, D4D_STRING *buffText, D4D_TAB *pTab, D4D_COLOR colorText, D4D_COLOR colorBkgd, D4D_COOR radius)
Function draw text with TAB function in rectangle with round corners.
Byte D4D_TEXT_PROPERTIES
The string text properties type. The masks are described here D4D BASE Defines masks of aligment prop...
D4D_COOR cx
Size in axis X (width)
Byte D4D_COOR
Type definition of eGUI coordination variables.
D4D_POINT position
Position on the screen/object.
D4D_COOR radius
Screen corner radius.
#define D4D_ALIGN_H_LEFT_MASK
The horizontal left aligment option mask (for texts and also bitmaps).
D4D_COOR radius
Object corners radius.
unsigned char Byte
Type definition of Byte (unsigned 8-bit).
void D4D_Circle(D4D_POINT *pCenter, D4D_COOR r, D4D_LINETYPE ltype, D4D_COLOR color)
Function draw circle on the screen.
void D4D_FillRectToXY(D4D_COOR x, D4D_COOR y, D4D_COLOR color)
Function draw filled rectangle on the screen.
void D4D_FillRRectColorScaleToXY(D4D_COOR x, D4D_COOR y, D4D_COLOR startColor, D4D_COLOR endColor, D4D_DIRECTION direction, D4D_COOR radius)
Function draw filled rectangle with round corners with changing color (cross color from start to end ...
void D4D_FillCircle(D4D_POINT *pCenter, D4D_COOR r, D4D_COLOR color)
Function draw filled circle on the screen.
void D4D_CircleXY(D4D_COOR x, D4D_COOR y, D4D_COOR r, D4D_LINETYPE ltype, D4D_COLOR color)
Function draw circle on the screen.
D4D_COLOR D4D_ChangeColorIntesity(D4D_COLOR color, sByte intensity)
Compute change of color intesity.
#define D4D_ALIGN_H_MASK
The horizontal aligment option mask (for texts and also bitmaps).
void D4D_PutPixelXY(D4D_COOR x, D4D_COOR y, D4D_LINETYPE type, D4D_COLOR color)
Function puts one pixel on the screen.
void D4D_QuadrantXY(D4D_COOR x, D4D_COOR y, D4D_COOR radius, D4D_LINETYPE ltype, D4D_COLOR color, D4D_QUADRANT quadrant)
Function draw quadrant of circle on the screen.
void D4D_LCD_PutPixel(D4D_COOR x1, D4D_COOR y1, D4D_LINETYPE line_type, D4D_COLOR color)
D4D_TCHAR * pText
pointer to text array
void D4D_BoxXY(D4D_COOR x1, D4D_COOR y1, D4D_COOR x2, D4D_COOR y2, D4D_LINETYPE ltype, D4D_COLOR colorLine, D4D_COLOR colorFill)
Function draw filled rectangle with outline on the screen.
D4D_STR_PROPERTIES * str_properties
pointer to string properties
D4D_COOR y
Coordination in axis Y.
void D4D_FillRectColorScale(D4D_POINT *ppt, D4D_SIZE *psz, D4D_COLOR startColor, D4D_COLOR endColor, D4D_DIRECTION direction)
Function draw filled rectangle with changing color (cross color from start to end color) on the scree...
D4D_OBJECT_PTR D4D_GetFocusedObject(const D4D_SCREEN *pScreen)
The function returns pointer to object that is focused in given screen.
#define D4D_BEVEL_FORE_INTENSITY
D4D_BEVEL_FORE_INTENSITY constant default declaration. Sets the percentual change of color for bevel ...
void D4D_PutPixel(D4D_POINT *ppt, D4D_LINETYPE type, D4D_COLOR color)
Function puts one pixel on the screen.
D4D_SIZE size
Size of the object.
void D4D_RRect(D4D_POINT *ppt, D4D_SIZE *psz, D4D_LINETYPE ltype, D4D_COLOR color, D4D_COOR radius)
Function draw rectangle on the screen with round corners.
#define D4D_FNT_PRTY_TRANSPARENT_MASK
void D4D_Bevel(D4D_POINT *ppt, D4D_SIZE *psz, D4D_COLOR color, D4D_BEVEL type, D4D_COOR radius)
Function draw standard object bevel specified by parameters.
static D4D_POINT d4d_curXY
D4D_COOR D4D_RndCornerGetNonPrintedPxl(D4D_COOR radius, D4D_COOR line)
Function that counts number of printed pixels in specified line of circle quadrant.
D4D_DIRECTION
Type definition of eGUI direction type.
Type definition of eGUI tabulation structure.
void D4D_FillRRectTo(D4D_POINT *ppt, D4D_COLOR color, D4D_COOR radius)
Function draw filled rectangle on the screen with round corners.
D4D_POINT D4D_GetClientToScreenPoint(D4D_OBJECT *pObject, D4D_POINT *nClientPoint)
The function convert client point on the screen to the global screen point.
D4D_BEVEL
Type definition of eGUI bevel type.
#define D4D_ALIGN_V_BOTTOM_MASK
The vertical bottom aligment option mask (for texts and also bitmaps).
The object main structure type definition.
D4D_QUADRANT
Type definition of eGUI circle quadrant.
#define D4D_BEVEL_WIDTH
D4D_BEVEL_WIDTH constant declaration - can't be changed!
Second quadrant <90-180)
void D4D_LCD_QCircle(D4D_COOR cx, D4D_COOR cy, D4D_COOR radius, D4D_BOOL fill, D4D_LINETYPE line_type, D4D_COLOR color, D4D_QUADRANT quadrant)
void D4D_FillRRectColorScaleXY(D4D_COOR x1, D4D_COOR y1, D4D_COOR x2, D4D_COOR y2, D4D_COLOR startColor, D4D_COLOR endColor, D4D_DIRECTION direction, D4D_COOR radius)
Function draw filled rectangle with round corners with changing color (cross color from start to end ...
void D4D_LCD_PrintStr(D4D_PRINT_DESC *p_StrDes)
Fourth quadrant <270-360)
#define D4D_ALIGN_H_CENTER_MASK
The horizontal center aligment option mask (for texts and also bitmaps).
D4D_COOR cy
Size in axis Y (height)
#define D4D_ALIGN_V_MASK
The vertical aligment option mask (for texts and also bitmaps).
D4D_POINT position
Screen coordination on physical screen (standard screen has {0,0})
void D4D_FillRectColorScaleXY(D4D_COOR x1, D4D_COOR y1, D4D_COOR x2, D4D_COOR y2, D4D_COLOR startColor, D4D_COLOR endColor, D4D_DIRECTION direction)
Function draw filled rectangle with changing color (cross color from start to end color) on the scree...
LWord D4D_BOOL
Type definition of eGUI boolean.
#define D4D_UNUSED(x)
Macro used just for notify compiler that the input parameter is not used.
void D4D_RectXY(D4D_COOR x1, D4D_COOR y1, D4D_COOR x2, D4D_COOR y2, D4D_LINETYPE ltype, D4D_COLOR color)
Function draw rectangle on the screen.
void D4D_FillQuadrant(D4D_POINT *pCenter, D4D_COOR radius, D4D_COLOR color, D4D_QUADRANT quadrant)
Function draw fill quadrant of circle on the screen.
Type definition of eGUI size structure.
void D4D_DrawTextRectTabXY(D4D_COOR x1, D4D_COOR y1, D4D_COOR x2, D4D_COOR y2, D4D_STRING *buffText, D4D_TAB *pTab, D4D_COLOR colorText, D4D_COLOR colorBkgd)
Function draw text with TAB function in rectangle.
void D4D_DrawTextRectTabToXY(D4D_COOR x, D4D_COOR y, D4D_STRING *buffText, D4D_TAB *pTab, D4D_COLOR colorText, D4D_COLOR colorBkgd)
Function draw text on XY coordination with TAB function in rectangle.
void D4D_LCD_Circle(D4D_COOR cx, D4D_COOR cy, D4D_COOR radius, D4D_BOOL fill, D4D_LINETYPE line_type, D4D_COLOR color)
sLWord D4D_INDEX_DELTA
Type definition of eGUI general index variables for signed offsets.
void D4D_RRectXY(D4D_COOR x1, D4D_COOR y1, D4D_COOR x2, D4D_COOR y2, D4D_LINETYPE ltype, D4D_COLOR color, D4D_COOR radius)
Function draw rectangle on the screen with round corners.
void D4D_RRectTo(D4D_POINT *ppt, D4D_LINETYPE ltype, D4D_COLOR color, D4D_COOR radius)
Function draw rectangle on the screen with round corners.
void D4D_RBoxToXY(D4D_COOR x, D4D_COOR y, D4D_LINETYPE ltype, D4D_COLOR colorLine, D4D_COLOR colorFill, D4D_COOR radius)
Function draw filled rectangle with outline on the screen with round corners.
void D4D_FillRRect(D4D_POINT *ppt, D4D_SIZE *psz, D4D_COLOR color, D4D_COOR radius)
Function draw filled rectangle on the screen with round corners.
void D4D_FillRRectColorScale(D4D_POINT *ppt, D4D_SIZE *psz, D4D_COLOR startColor, D4D_COLOR endColor, D4D_DIRECTION direction, D4D_COOR radius)
Function draw filled rectangle with round corners with changing color (cross color from start to end ...
void D4D_FillRRectColorScaleTo(D4D_POINT *ppt, D4D_COLOR startColor, D4D_COLOR endColor, D4D_DIRECTION direction, D4D_COOR radius)
Function draw filled rectangle with round corners with changing color (cross color from start to end ...
void D4D_DrawTextRRectTabTo(D4D_POINT *ppt, D4D_STRING *buffText, D4D_TAB *pTab, D4D_COLOR colorText, D4D_COLOR colorBkgd, D4D_COOR radius)
Function draw text on XY coordination with TAB function in rectangle with round corners.
#define D4D_ALIGN_V_TOP_MASK
The vertical top aligment option mask (for texts and also bitmaps).
D4D driver - resistive touch screen driver function header file.
#define D4D_OBJECT_F_BEVEL_MASK
Object bevel border mask.
void D4D_FillRRectXY(D4D_COOR x1, D4D_COOR y1, D4D_COOR x2, D4D_COOR y2, D4D_COLOR color, D4D_COOR radius)
Function draw filled rectangle on the screen with round corners.
void D4D_LineToXY(D4D_COOR x, D4D_COOR y, D4D_LINETYPE ltype, D4D_COLOR color)
Function draw line on the screen.
void D4D_PutPixelTo(D4D_LINETYPE type, D4D_COLOR color)
Function puts one pixel on the screen.
void D4D_LineTo(D4D_POINT *ppt, D4D_LINETYPE ltype, D4D_COLOR color)
Function draw line on the screen.
LWord D4D_COLOR
Type definition of eGUI color variables.
D4D_FONT_PROPERTIES font_properties
Font properties structure.
D4D_FONT_SIZE D4D_GetFontHeight(D4D_FONT ix)
void D4D_RectToXY(D4D_COOR x, D4D_COOR y, D4D_LINETYPE ltype, D4D_COLOR color)
Function draw rectangle on the screen.
void D4D_MoveTo(D4D_POINT *ppt)
Function move logic cursor to new position.
void D4D_LCD_RRect(D4D_COOR x1, D4D_COOR y1, D4D_COOR x2, D4D_COOR y2, D4D_LINETYPE line_type, D4D_COLOR color, D4D_COOR radius)
D4D_INDEX printOff
Offset of string that should be used (printed).
D4D_COOR x
Coordination in axis X.
D4D_COOR D4D_DisplayWidth(void)
void D4D_DrawTextRRectTab(D4D_POINT *ppt, D4D_SIZE *psz, D4D_STRING *buffText, D4D_TAB *pTab, D4D_COLOR colorText, D4D_COLOR colorBkgd, D4D_COOR radius)
Function draw text with TAB function in rectangle with round corners.