74 #if D4D_ROUND_CORNER_ENABLE == D4D_TRUE
187 #pragma mark Draving Functions
207 #if D4D_LLD_FLUSH_ELEMENT != D4D_FALSE
230 for (i=0; i < i_max ; ++i)
232 #if D4D_LLD_FLUSH_ELEMENT != D4D_FALSE
247 sWord delta_x, delta_y;
250 if((x1 == x2) || (y1 == y2))
277 ix = (
sByte)((x2 > x1)?1:-1);
278 iy = (
sByte)((y2 > y1)?1:-1);
282 if (delta_x >= delta_y)
285 sLWord error = delta_y - (delta_x >> 1);
291 if (error || (ix > 0))
309 sLWord error = delta_x - (delta_y >> 1);
315 if (error || (iy > 0))
391 #pragma mark Draving Round Corner Functions
395 #if D4D_ROUND_CORNER_ENABLE == D4D_TRUE
407 if(radius && (x1 != x2) && (y1 != y2))
410 D4D_LCD_Box(x1, (
unsigned short)(y1+radius), x2, (
unsigned short)(y2-radius), color);
411 D4D_LCD_Box((
unsigned short)(x1+radius),y1,(
unsigned short)(x2-radius),(
unsigned short)(y1+radius), color);
412 D4D_LCD_Box((
unsigned short)(x1+radius),(
unsigned short)(y2-radius),(
unsigned short)(x2-radius),y2, color);
423 if((y2 - y1) - (2 * radius) > 1)
429 int k = (y2 - y1) / 2;
437 if((x2 - x1) - (2 * radius) > 1)
443 int k = (x2 - x1) / 2;
462 if(radius && (x1 != x2) && (y1 != y2))
464 D4D_LCD_Line((
unsigned short)(x1+radius), y1, (
unsigned short)(x2-radius), y1, line_type, color);
465 D4D_LCD_Line(x2, (
unsigned short)(y1+radius), x2, (
unsigned short)(y2-radius), line_type, color);
466 D4D_LCD_Line((
unsigned short)(x1+radius), y2, (
unsigned short)(x2-radius), y2, line_type, color);
467 D4D_LCD_Line(x1, (
unsigned short)(y1+radius), x1, (
unsigned short)(y2-radius), line_type, color);
477 if((y2 - y1) - (2 * radius) > 1)
483 int k = (y2 - y1) / 2;
491 if((x2 - x1) - (2 * radius) > 1)
497 int k = (x2 - x1) / 2;
607 #pragma mark Touch Screen Functions
626 d4d_tchCalib = newCalib;
676 Temp = *TouchPositionX;
677 *TouchPositionX = *TouchPositionY;
682 Temp = *TouchPositionX;
684 *TouchPositionY = Temp;
710 return D4D_LLD_TCH.D4DTCH_GetPositionRaw (TouchPositionX, TouchPositionY);
736 while (
D4D_LLD_TCH.D4DTCH_GetPositionRaw ((
unsigned short*)X, (
unsigned short*)Y) == 0)
792 for(tmp_i=0;tmp_i<2;tmp_i++)
795 D4D_GetCalibrationPoint(tmp_i, &X[tmp_i], &Y[tmp_i], fore, bckg);
801 tmp_txtbuff.
pText = str_touch;
847 if ((X[0] > X[1]) && (Y[0] > Y[1]))
852 dX = (
Word)(X[0] - X[1]);
855 dY = (
Word)(Y[0] - Y[1]);
909 #pragma mark Dummy Touch Screen Functions
void D4D_LCD_RBox(D4D_COOR x1, D4D_COOR y1, D4D_COOR x2, D4D_COOR y2, D4D_COLOR color, D4D_COOR radius)
D4D_LINETYPE
Type definition of eGUI line type.
D4D_INDEX buffSize
size of text buffer array
D4D_WCHAR D4D_TCHAR
Type definition of eGUI character (it depends on UNICODE setting if this is D4D_CHAR or D4D_WCHAR)...
unsigned short TouchScreenYBitsPerPixelx16
Input value gain per 16 pixels in axis Y.
D4D_FONT_TYPE * D4D_GetFont(D4D_FONT ix)
D4D_INDEX printLen
Length of string that should be used (printed).
signed long sLWord
Type definition of sLWord (signed 32-bit).
Type definition of eGUI touch screen calibration structure.
D4D_COLOR(* D4DLCD_Read_PixelColor)(void)
The LCD driver read pixel function. The pixels will be read on position (automaticaly incremented) se...
void(* D4DLCD_FlushBuffer)(D4DLCD_FLUSH_MODE mode)
The LCD driver flush function.
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.
void D4D_TCH_Calibrate(D4D_COLOR fore, D4D_COLOR bckg)
The notification that the end of screen is draw.
unsigned short touchOffMaxX
Maximal valid raw value of axis X.
#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.
#define D4D_SCREEN_SIZE_LONGER_SIDE
This macro is used to define the size of longer side of LCD. If not defined, the longer side is set t...
D4D_COOR D4D_DisplayHeight(void)
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 fontId
index of used font
The flush after one basic element is draw.
void D4D_LCD_Box(D4D_COOR x1, D4D_COOR y1, D4D_COOR x2, D4D_COOR y2, D4D_COLOR color)
Landscape up side down orientation.
unsigned char(* D4DLCD_DeInit)(void)
The LCD driver deinicialization function.
Byte D4D_TCH_GetCalibrationStatus(void)
#define D4D_TRUE
This is definition of boolean operation value in eGUI - TRUE.
void D4D_TCH_GetCalibratedPosition(D4D_COOR *TouchPositionX, D4D_COOR *TouchPositionY)
Word D4D_Abs16(sWord num)
Calculation of absolute value - 16 bit.
void D4D_ClearScreen(D4D_COLOR color)
Function readraw complete screen by one color.
Third quadrant <180-270)
D4D Driver main header file.
void D4D_LCD_SetOrientation(D4D_ORIENTATION new_orientation)
The string properties type. This structure contains as Font as Text properties.
void D4D_TCH_DrawCalibrationPoint(D4D_COOR X, D4D_COOR Y, D4D_COLOR Color)
void D4D_LCD_SwapCoor(D4D_COOR *c1, D4D_COOR *c2)
static void D4D_LCD_Plot4pointsfill(D4D_COOR cx, D4D_COOR cy, D4D_COOR x, D4D_COOR y, D4D_COLOR color)
D4D Driver private header file.
#define D4D_DEFSTR(str)
Macro that helps declare the strings in eGUI.
D4D_ORIENTATION
Type definition of eGUI display orientation.
Portrait up side down orientation.
D4DLCD_ORIENTATION
D4D low level screen orientation enumeration type.
Byte D4D_COOR
Type definition of eGUI coordination variables.
unsigned short TouchScreenXBitsPerPixelx16
Input value gain per 16 pixels in axis X.
unsigned char Byte
Type definition of Byte (unsigned 8-bit).
D4D low level touch screen limitation structure.
#define D4D_DrawTextXY(x, y, buffText, colorText, colorBkgd)
Function that draw text on the screen the coordination is sets directly XY.
D4D_ORIENTATION D4D_LCD_GetOrientation(void)
void D4D_LCD_PutPixel(D4D_COOR x1, D4D_COOR y1, D4D_LINETYPE line_type, D4D_COLOR color)
D4D_TOUCHSCREEN_CALIB D4D_TCH_GetCalibration(void)
#define NULL
Type definition of null pointer.
D4D_TCHAR * pText
pointer to text array
unsigned long LWord
Type definition of LWord (unsigned 32-bit).
D4D_STR_PROPERTIES * str_properties
pointer to string properties
Byte D4D_TCH_GetRawPosition(D4D_COOR *TouchPositionX, D4D_COOR *TouchPositionY)
signed short sWord
Type definition of sWord (signed 16-bit).
static void D4D_LCD_Plot8points(D4D_COOR cx, D4D_COOR cy, D4D_COOR x, D4D_COOR y, D4D_BOOL fill, D4D_LINETYPE line_type, D4D_COLOR color)
#define D4D_SCREEN_SIZE_SHORTER_SIDE
This macro is used to define the size of shorter side of LCD. If not defined, the shorter side is set...
unsigned short rawDataScale
The scale mask of ADC convertor.
void D4D_TCH_SetCalibration(D4D_TOUCHSCREEN_CALIB newCalib)
D4D_QUADRANT
Type definition of eGUI circle quadrant.
signed char sByte
Type definition of sByte (signed 8-bit).
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)
Fourth quadrant <270-360)
D4D_BOOL D4D_LCD_Init(void)
unsigned char(* D4DLCD_SetOrientation)(D4DLCD_ORIENTATION new_orientation)
The LCD driver set orientation function.
const D4DLCD_FUNCTIONS D4D_LLD_LCD
LWord D4D_BOOL
Type definition of eGUI boolean.
The notification that the start of screen is done.
#define D4D_UNUSED(x)
Macro used just for notify compiler that the input parameter is not used.
static void D4D_LCD_QPlot4points(D4D_COOR cx, D4D_COOR cy, D4D_COOR x, D4D_COOR y, D4D_LINETYPE line_type, D4D_COLOR color, D4D_QUADRANT quadrant)
D4D_FONT_SIZE D4D_GetFontWidth(D4D_FONT ix)
void D4D_LCD_Circle(D4D_COOR cx, D4D_COOR cy, D4D_COOR radius, D4D_BOOL fill, D4D_LINETYPE line_type, D4D_COLOR color)
static void D4D_LCD_Plot4points(D4D_COOR cx, D4D_COOR cy, D4D_COOR x, D4D_COOR y, D4D_LINETYPE line_type, D4D_COLOR color)
static void D4D_LCD_QPlot8points(D4D_COOR cx, D4D_COOR cy, D4D_COOR x, D4D_COOR y, D4D_BOOL fill, D4D_LINETYPE line_type, D4D_COLOR color, D4D_QUADRANT quadrant)
unsigned short TouchScreenXoffset
Input value offset in axis X.
static D4D_ORIENTATION d4d_orientation
unsigned short touchOffMaxY
Maximal valid raw value of axis Y.
unsigned short TouchScreenYoffset
Input value offset in axis Y.
D4D driver - resistive touch screen driver function header file.
unsigned char ScreenCalibrated
Boolean if the values are valid.
#define D4DTCH_CALIB_CROSS_OFFSET
This macro is used in touch screen calibration to define offset of calibration points from edge of LC...
void(* D4DLCD_Send_PixelColor)(D4D_COLOR value)
The LCD driver send pixel function. The pixels will be draw on position (automaticaly incremented) se...
unsigned char(* D4DLCD_Init)(void)
The LCD driver initialization function.
LWord D4D_COLOR
Type definition of eGUI color variables.
Byte D4D_SprintDecU16(Word val, D4D_TCHAR *pText, D4D_TCHAR fill)
The function convert decimal unsigned 16 bit number to string.
D4D_FONT_PROPERTIES font_properties
Font properties structure.
D4D_FONT_SIZE D4D_GetFontHeight(D4D_FONT ix)
static void D4D_LCD_QPlot4pointsfill(D4D_COOR cx, D4D_COOR cy, D4D_COOR x, D4D_COOR y, D4D_COLOR color, D4D_QUADRANT quadrant)
#define D4D_FONT_SYSTEM_DEFAULT
This macro is used to define the system font index (For example used in touch screen calibration)...
unsigned short Word
Type definition of Word (unsigned 16-bit).
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).
The notification of forcing flush by user code.
D4D_COOR D4D_DisplayWidth(void)
unsigned char(* D4DLCD_SetWindow)(unsigned short x1, unsigned short y1, unsigned short x2, unsigned short y2)
The LCD driver Set logic window function. Into this logic window will be draw pixels.
void(* D4DLCD_Delay_ms)(unsigned short period)
The LCD driver delay function.