eGUI alias D4D  Release 3.0
Reference Manual
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
d4d_graph.c
Go to the documentation of this file.
1 /**************************************************************************
2 *
3 * Copyright 2014 by Petr Gargulak. eGUI Community.
4 * Copyright 2009-2013 by Petr Gargulak. Freescale Semiconductor, Inc.
5 *
6 ***************************************************************************
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License Version 3
9 * or later (the "LGPL").
10 *
11 * As a special exception, the copyright holders of the eGUI project give you
12 * permission to link the eGUI sources with independent modules to produce an
13 * executable, regardless of the license terms of these independent modules,
14 * and to copy and distribute the resulting executable under terms of your
15 * choice, provided that you also meet, for each linked independent module,
16 * the terms and conditions of the license of that module.
17 * An independent module is a module which is not derived from or based
18 * on this library.
19 * If you modify the eGUI sources, you may extend this exception
20 * to your version of the eGUI sources, but you are not obligated
21 * to do so. If you do not wish to do so, delete this
22 * exception statement from your version.
23 *
24 * This program is distributed in the hope that it will be useful,
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
27 *
28 * You should have received a copy of the GNU General Public License
29 * and the GNU Lesser General Public License along with this program.
30 * If not, see <http://www.gnu.org/licenses/>.
31 *
32 ***************************************************************************/
46 #include "d4d.h"
48 
49 //Internal API
52 
54 {
55  D4D_DEFSTR("Graph"),
57  NULL,
59 };
60 
61 // temporary structure for icon coordinate calculation
62 typedef struct
63 {
64  D4D_POINT position;
65  D4D_GEOMETRY contentGeom;
66  D4D_POINT graphPos;
67  D4D_SIZE graphSize;
68  D4D_POINT valLblOff;
69  Byte line_cnt;
70  D4D_COOR last_Xpos;
71  D4D_COOR curr_Xpos;
72 } D4D_GRAPH_TMP_VAL;
73 
74 #define _calc (*((D4D_GRAPH_TMP_VAL*)d4d_scratchPad))
75 
76 static void D4D_GraphUpdateTempPosX(D4D_OBJECT* pThis) {
77  D4D_GRAPH* pGraph = D4D_GET_GRAPH(pThis);
78  D4D_GRAPH_DATA* pData = pGraph->pData;
79 
80  _calc.last_Xpos = (D4D_COOR)(_calc.graphPos.x + D4D_MulDivUU16((Word)((pData->xPosCnt - 1) % pData->dataShowX), _calc.graphSize.cx, pData->dataShowX));
81  _calc.curr_Xpos = (D4D_COOR)(_calc.graphPos.x + D4D_MulDivUU16((Word)(pData->xPosCnt % pData->dataShowX), _calc.graphSize.cx, pData->dataShowX));
82 
83  if(_calc.curr_Xpos < _calc.last_Xpos)
84  _calc.curr_Xpos = (D4D_COOR)(_calc.last_Xpos + D4D_MulDivUU16(1, _calc.graphSize.cx, pData->dataShowX));
85 }
86 
87 
88 
89 static void D4D_GraphValue2Coor(D4D_OBJECT* pThis)
90 {
91  Byte i;
92  D4D_GRAPH* pGraph = D4D_GET_GRAPH(pThis);
93 
94  _calc.valLblOff.y = 0;
95  _calc.valLblOff.x = 0;
96 
97  _calc.position = D4D_GetClientToScreenPoint(pThis, &pThis->position);
98 
99  D4D_ComputeGeometry(&_calc.contentGeom, pThis);
100 
101  _calc.graphPos = _calc.contentGeom.pnt;
102  _calc.graphPos.x += D4D_GRAPH_BORDER_OFF;
103 
104  if((pGraph->textBuff.pText == NULL) || (D4D_GetFont(pGraph->textBuff.fontId) == NULL))
105  {
106  _calc.graphPos.y += D4D_GRAPH_BORDER_OFF;
107 #if D4D_ROUND_CORNER_ENABLE == D4D_TRUE
108  if(pThis->radius > D4D_GRAPH_BORDER_OFF)
109  _calc.graphPos.y += (D4D_COOR)(pThis->radius - D4D_GRAPH_BORDER_OFF);
110 #endif
111  }
112  else
113  _calc.graphPos.y += (D4D_COOR)(D4D_GetFontHeight(pGraph->textBuff.fontId) * 3 / 2);
114 
116  {
117  _calc.valLblOff.y = (D4D_COOR)(_calc.graphPos.y - _calc.contentGeom.pnt.y);
118  _calc.graphPos.y += (D4D_COOR)(D4D_GRAPH_VALUE_OFF + D4D_GetFontHeight(pGraph->labelFont));
119  }
120 
122  {
123  _calc.valLblOff.x = (D4D_COOR)(D4D_GRAPH_VALUE_OFF);
124  _calc.graphPos.x += (D4D_COOR)(D4D_GRAPH_VALUE_OFF + pGraph->pData->lblSizeY);
125  }
126 
127  _calc.graphSize.cx = (D4D_COOR)(_calc.contentGeom.sz.cx - (_calc.graphPos.x -_calc.contentGeom.pnt.x) - D4D_GRAPH_BORDER_OFF);
128 
129  _calc.graphSize.cy = (D4D_COOR)(_calc.contentGeom.sz.cy - (_calc.graphPos.y -_calc.contentGeom.pnt.y) - D4D_GRAPH_BORDER_OFF);
130 
131 
133  {
134  _calc.graphSize.cy -= (D4D_COOR)(D4D_GRAPH_VALUE_OFF + D4D_GetFontHeight(pGraph->labelFont));
135  _calc.valLblOff.y = (D4D_COOR)(_calc.graphPos.y - _calc.contentGeom.pnt.y + _calc.graphSize.cy + D4D_GRAPH_VALUE_OFF + 2);
136  }
137 #if D4D_ROUND_CORNER_ENABLE == D4D_TRUE
138  else
139  if(pThis->radius > D4D_GRAPH_BORDER_OFF)
140  _calc.graphSize.cy -= (D4D_COOR)(pThis->radius - D4D_GRAPH_BORDER_OFF);
141 #endif
142 
143 
145  {
146  _calc.graphSize.cx -= (D4D_COOR)(D4D_GRAPH_VALUE_OFF + pGraph->pData->lblSizeY);
147  _calc.valLblOff.x = (D4D_COOR)(_calc.graphPos.x - _calc.contentGeom.pnt.x + _calc.graphSize.cx + D4D_GRAPH_VALUE_OFF + 2);
148  }
149 #if D4D_ROUND_CORNER_ENABLE == D4D_TRUE
150  else
151  if(pThis->radius > D4D_GRAPH_BORDER_OFF)
152  _calc.graphSize.cx -= (D4D_COOR)(pThis->radius - D4D_GRAPH_BORDER_OFF);
153 #endif
154 
155  i=0;
156  while(pGraph->traces[i].pData != NULL)
157  i++;
158  _calc.line_cnt = i;
159 }
160 
162  D4D_GRAPH* pGraph = D4D_GET_GRAPH(pThis);
163 
164  Byte i, j, k;
165 
166  if(pGraph->OnNeedLabelText == NULL)
167  return (D4D_COOR)(3 * D4D_GetFontWidth(pGraph->labelFont)); // for label will be used numbers from 0 to 255
168 
169  j = 0;
170 
171  for(i=0; i < pGraph->grid.y_cnt; i++)
172  {
173  k = (Byte)D4D_GetTextLength(pGraph->OnNeedLabelText(pThis,D4D_FALSE, i, 1));
174  if(j < k)
175  {
176  j = k;
177  }
178  }
179 
180  return (D4D_COOR)(j * D4D_GetFontWidth(pGraph->labelFont));
181 }
182 
184 {
185  D4D_GRAPH* pGraph = D4D_GET_GRAPH(pThis);
186  return(D4D_COOR)(_calc.graphPos.x + D4D_MulDivUU16(gridIx, _calc.graphSize.cx, (Word)(pGraph->grid.x_cnt + 1)));
187 }
188 
190 {
191  D4D_GRAPH* pGraph = D4D_GET_GRAPH(pThis);
192  return(D4D_COOR)(_calc.graphPos.y + D4D_MulDivUU16(gridIx, _calc.graphSize.cy, (Word)(pGraph->grid.y_cnt + 1)));
193 }
194 
195 
196 static void D4D_GraphPrintLabel(D4D_OBJECT* pThis, D4D_BOOL axisX, Byte gridIx, D4D_GRAPH_SAMPLE_IX sampleIx)
197 {
198  D4D_GRAPH* pGraph = D4D_GET_GRAPH(pThis);
199  D4D_GRAPH_DATA* pData = pGraph->pData;
200  D4D_COOR GridOffX = (D4D_COOR)(_calc.graphSize.cx / (pGraph->grid.x_cnt + 1));
201  D4D_POINT tmp_point;
202  D4D_SIZE tmp_size;
203  D4D_STRING tmp_txtbuff;
204  D4D_STR_PROPERTIES tmp_str_prty;
205  D4D_TCHAR tmp_str[8];
206  D4D_TCHAR* pStr;
207 
209  tmp_str_prty.text_properties = 0;
210 
211  tmp_txtbuff.str_properties = &tmp_str_prty;
212 
213 
214  if(axisX) {
215  if(gridIx > pGraph->grid.x_cnt)
216  return;
217  }else {
218  if(gridIx > pGraph->grid.y_cnt)
219  return;
220  }
221 
222  if(pGraph->OnNeedLabelText == NULL) {
223  if(axisX) {
224  tmp_str[D4D_SprintDecU16((Word)(sampleIx), &tmp_str[0], 0)] = 0;
225  }else{
226  tmp_str[D4D_SprintDecU8((Byte)((256 / (pGraph->grid.y_cnt + 1)) * (pGraph->grid.y_cnt - gridIx + 1)), &tmp_str[0], 0)] = 0;
227  }
228 
229  pStr = tmp_str;
230  }else {
231  pStr = pGraph->OnNeedLabelText(pThis, axisX, (D4D_INDEX)((axisX)? gridIx : (pGraph->grid.y_cnt - gridIx + 1)), sampleIx);
232  }
233 
234  tmp_size.cy = D4D_GetFontHeight(pGraph->labelFont); // invoke autosize capability in draw function for y axis
235 
236  if(axisX) {
237  tmp_point.x = D4D_GraphGetGridCoorX(pThis, gridIx);
238  tmp_point.x -= (D4D_COOR)(GridOffX / 2);
239  tmp_point.y = (D4D_COOR)(_calc.contentGeom.pnt.y + _calc.valLblOff.y);
240  tmp_size.cx = (D4D_COOR)(GridOffX - 1);
241  }else {
242  // axis Y
243  tmp_point.y = D4D_GraphGetGridCoorY(pThis, gridIx);
244  tmp_point.y -= (D4D_COOR)(1 + (tmp_size.cy / 2));
245  tmp_point.x = (D4D_COOR)(_calc.contentGeom.pnt.x + _calc.valLblOff.x);
246  tmp_size.cx = pData->lblSizeY;
247  }
248 
249 
250 
251  tmp_txtbuff.pText = pStr;
252  tmp_txtbuff.fontId = pGraph->labelFont;
253  tmp_txtbuff.str_properties->text_properties = D4D_ALIGN_H_CENTER_MASK; // center aligment
254  tmp_txtbuff.buffSize = 0;
255  tmp_txtbuff.printLen = D4D_GetTextLength(tmp_txtbuff.pText);
256  tmp_txtbuff.printOff = 0;
257  D4D_DrawTextRect(&tmp_point, &tmp_size, &tmp_txtbuff, D4D_ObjectGetForeFillColor(pThis), D4D_ObjectGetBckgFillColor(pThis));
258 
259 }
260 
261 
262 static void D4D_GraphDrawEmptyGraph(D4D_OBJECT* pThis) {
263  D4D_GRAPH* pGraph = D4D_GET_GRAPH(pThis);
264  D4D_COLOR clrT;
265  D4D_COOR tmp_coor;
266  Byte i;
267 
268  D4D_GRAPH_SAMPLE_IX tmp_sampleIx = pGraph->pData->xPosCnt;
269 
270  tmp_sampleIx -= tmp_sampleIx % pGraph->pData->dataShowX;
271 
272  // Draw graph background box
273  D4D_BoxXY((D4D_COOR)(_calc.graphPos.x - 1), (D4D_COOR)(_calc.graphPos.y - 1), (D4D_COOR)(_calc.graphPos.x + _calc.graphSize.cx + 2), (D4D_COOR)(_calc.graphPos.y + _calc.graphSize.cy + 2), D4D_LINE_THIN, D4D_ObjectGetForeFillColor(pThis), D4D_ObjectGetBckgFillColor(pThis));
274 
276 
277  if(!D4D_IsEnabled(pThis))
278  clrT = D4D_GetGreyScale(clrT);
279 
280  // Draw drig lines in X direction
281  for(i = 1; i < (pGraph->grid.x_cnt + 1);i++ )
282  {
283  tmp_coor = D4D_GraphGetGridCoorX(pThis, i);
284  D4D_MoveToXY(tmp_coor, _calc.graphPos.y);
285  D4D_LineToXY(tmp_coor, (D4D_COOR)(_calc.graphPos.y + _calc.graphSize.cy + 1), D4D_LINE_THIN, clrT);
286  // Draw values on axis X if are enabled
287 
288  if(_calc.valLblOff.y)
289  {
290  D4D_GraphPrintLabel(pThis, D4D_TRUE, (Byte)i, tmp_sampleIx + (i * (pGraph->pData->dataShowX / (pGraph->grid.x_cnt + 1))));
291  }
292  }
293 
294  // Draw drig lines in Y direction
295  for(i=1; i < (pGraph->grid.y_cnt + 1);i++ )
296  {
297  D4D_MoveToXY(_calc.graphPos.x, D4D_GraphGetGridCoorY(pThis, i));
298  D4D_LineToXY((D4D_COOR)(_calc.graphPos.x + _calc.graphSize.cx + 1), D4D_GraphGetGridCoorY(pThis, i), D4D_LINE_THIN, clrT);
299  if(_calc.valLblOff.x)
300  {
301  D4D_GraphPrintLabel(pThis, D4D_FALSE, (Byte)i, 1);
302  }
303  }
304 }
305 
306 /*******************************************************
307 *
308 * GRAPH Drawing routine
309 *
310 *******************************************************/
311 
312 static void D4D_GraphOnDraw(D4D_MESSAGE* pMsg)
313 {
314  D4D_OBJECT* pThis = pMsg->pObject;
315  D4D_GRAPH* pGraph = D4D_GET_GRAPH(pThis);
316  D4D_GRAPH_DATA* pData = pGraph->pData;
317  D4D_OBJECT_DRAWFLAGS draw = pMsg->prm.draw;
318  D4D_COLOR clrT, clrB;
320  D4D_INDEX i;
321  D4D_POINT tmp_linePoint;
322 
323  clrT = D4D_ObjectGetForeColor(pThis, draw);
324  clrB = D4D_ObjectGetBckgFillColor(pThis);
325 
326  #ifdef D4D_DEBUG
327  // sanity check
329  #endif
330 
331  D4D_GraphValue2Coor(pThis);
332 
333  /*****************************************
334  * Draw complete object
335  ****************************************/
337  {
339  pData->lblSizeY = D4D_GraphGetSizeLblY(pThis);
340 
341  D4D_GraphValue2Coor(pThis);
342 
343  // Draw main background box
344  D4D_FillRRect(&_calc.position, &pThis->size, clrB, pThis->radius);
345 
346  // draw the text
347  if(pGraph->textBuff.pText != NULL)
348  {
349  D4D_SIZE tmp_size;
350  tmp_size.cy = D4D_GetFontHeight(pGraph->textBuff.fontId); // invoke automat
351  tmp_linePoint.x = (D4D_COOR)(_calc.contentGeom.pnt.x);
352  tmp_linePoint.y = (D4D_COOR)(_calc.contentGeom.pnt.y + tmp_size.cy / 4);
353  tmp_size.cx = (D4D_COOR)(_calc.contentGeom.sz.cx - 2);
354  #if D4D_ROUND_CORNER_ENABLE == D4D_TRUE
355  tmp_linePoint.x += pThis->radius;
356  tmp_size.cx -= (D4D_COOR)(2 * pThis->radius);
357  #endif
358  D4D_DrawTextRect(&tmp_linePoint, &tmp_size, &pGraph->textBuff, D4D_ObjectGetForeFillColor(pThis), D4D_ObjectGetBckgFillColor(pThis));
359  }
360 
362 
363 
364 
365  // Sets the last data index to redraw all bytes in Memory on screen in complete redraw action
366  if(pData->initData < (pGraph->dataLenght - 1)) {
367  pData->xPosCnt = 1;
368  pData->lastShowPos = 0;
369  }
370  else {
371  pData->lastShowPos = (D4D_GRAPH_DATA_LEN)(pData->lastDataPos + 1);
372  i = (D4D_COOR)(pData->xPosCnt % pData->dataShowX);
373  if(i > pGraph->dataLenght)
374  i = pGraph->dataLenght;
375  pData->xPosCnt -= (D4D_COOR)i;//(pData->xPosCnt % _calc.graphSize.cx);
376  }
377 
379  pData->columnDrawed = (D4D_COOR)(_calc.last_Xpos - 1);
380 
381  i = 1;
382  while((D4D_GraphGetGridCoorX(pThis,(Byte) i) < _calc.curr_Xpos) && (i < pGraph->grid.x_cnt)) {
383  i++;
384  };
385  pData->drigDrawedX = i;
386  }
387 
388  // Draw the frame
389  if(draw & (D4D_OBJECT_DRAWFLAGS_COMPLETE | D4D_OBJECT_DRAWFLAGS_STATE))
390  D4D_DrawFrame(pThis, clrT, clrB);
391 
392  /*********************************************
393  * Draw graph all lines from all pending input record
394  ********************************************/
395  while(pData->lastShowPos != pData->lastDataPos)
396  {
397 
399 
400  // if normla mode of graph is selected then in each lap of run the graph has to be redrawed
402  {
403  /*********************************************
404  * Draw graph in normal mode when it over run
405  ********************************************/
406  if(pData->columnDrawed > _calc.curr_Xpos)
407  {
409  pData->drigDrawedX = 1;
410  }else
411  {
412  // Draw values on axis X if are enabled
413  if(_calc.valLblOff.y)
414  {
415  if(_calc.curr_Xpos != pData->columnDrawed) // check if this label was drawed yet on
416  {
417  if(D4D_GraphGetGridCoorX(pThis, (Byte)pData->drigDrawedX) < _calc.curr_Xpos)
418  {
419  D4D_GraphPrintLabel(pThis, D4D_TRUE, (Byte)pData->drigDrawedX, pData->xPosCnt);
420  pData->drigDrawedX++;
421  }
422  }
423  }
424  }
425  }
426 
427  if(pData->columnDrawed > _calc.curr_Xpos) {
428  pData->drigDrawedX = 1;
429  pData->columnDrawed = (D4D_COOR)(_calc.graphPos.x - 1);
430  }
431 
433  {
434  if(pData->columnDrawed < _calc.curr_Xpos) {
435 
436  D4D_POINT tmp_Point;
437 
438  if(_calc.last_Xpos == _calc.graphPos.x) {
439  D4D_MoveToXY((D4D_COOR)(_calc.graphPos.x + _calc.graphSize.cx + 1), _calc.graphPos.y);
440  D4D_FillRectToXY((D4D_COOR)(_calc.graphPos.x + _calc.graphSize.cx + 1), (D4D_COOR)(_calc.graphPos.y + _calc.graphSize.cy), clrB);
441  }
442 
443  // ***** Clear the old drawed traces *****
444 
445  tmp_Point.y = _calc.graphPos.y;
446  tmp_Point.x = (D4D_COOR)(pData->columnDrawed + 1);//(D4D_COOR)(_calc.last_Xpos + 1);
447  D4D_MoveTo(&tmp_Point);
448 
449  tmp_Point.y += (D4D_COOR)(_calc.graphSize.cy + 1);
450  tmp_Point.x = _calc.curr_Xpos;
451  D4D_FillRectTo(&tmp_Point, clrB);
452 
453  // ***** End of: Clear the old drawed traces *****
454 
455  if(D4D_IsEnabled(pThis))
456  clrT = clrGrid;
457  else
458  clrT = D4D_GetGreyScale(clrGrid);
459 
460 
461  //Draw vertical grid lines if needed
462  for(i = _calc.last_Xpos; i < _calc.curr_Xpos;i++)
463  {
464  if(D4D_GraphGetGridCoorX(pThis, (Byte)pData->drigDrawedX) <= i)
465  {
466  if(pData->drigDrawedX <= pGraph->grid.x_cnt) {
467 
468  tmp_Point.x = (D4D_COOR)(i);
469  tmp_Point.y = _calc.graphPos.y;
470  D4D_MoveTo(&tmp_Point);
471  tmp_Point.y += (D4D_COOR)(_calc.graphSize.cy + 1) ;
472  D4D_LineTo(&tmp_Point, D4D_LINE_THIN, clrT);
473 
474  if(_calc.valLblOff.y)
475  D4D_GraphPrintLabel(pThis, D4D_TRUE, (Byte)pData->drigDrawedX, pData->xPosCnt);
476 
477  pData->drigDrawedX++;
478  }
479  }
480  }
481 
482  //Draw horizontal grid lines if needed
483  for(i=1; i < (pGraph->grid.y_cnt + 1);i++ )
484  {
485  tmp_Point.y = D4D_GraphGetGridCoorY(pThis,(Byte) i);
486  tmp_Point.x = _calc.last_Xpos;
487  D4D_MoveTo(&tmp_Point);
488  tmp_Point.x = _calc.curr_Xpos;
489  D4D_LineTo(&tmp_Point, D4D_LINE_THIN, clrT);
490  }
491 
492  // Draw disjuctive line
493 
494  tmp_Point.x = (D4D_COOR)(_calc.curr_Xpos + 1);
495  if(tmp_Point.x <= (_calc.graphPos.x + _calc.graphSize.cx)) {
496 
497  tmp_Point.y = _calc.graphPos.y;
498  D4D_MoveTo(&tmp_Point);
499  tmp_Point.y += (D4D_COOR)(_calc.graphSize.cy + 1);
500  D4D_LineTo(&tmp_Point, D4D_LINE_THIN, D4D_ObjectGetForeColor(pThis, draw));
501  }
502  }
503  }
504 
505  // add only a new data
506  for(i=0; i < _calc.line_cnt;i++) // for all lines
507  {
508  tmp_linePoint.x = _calc.last_Xpos;
509 
510  switch(pGraph->traces[i].type & D4D_GRAPH_TRACE_TYPE_MASK)
511  {
513  // Compute the last position of line
514 
515  if(pData->xPosCnt == 0)
516  {
517  tmp_linePoint.y = (D4D_COOR)(_calc.graphPos.y + _calc.graphSize.cy);
518  D4D_MoveTo(&tmp_linePoint);
519  }else
520  {
521  D4D_INDEX lastData;
522 
523  if(pGraph->pData->lastShowPos == 0)
524  lastData = (D4D_INDEX)(pGraph->dataLenght - 1);
525  else
526  lastData = (D4D_INDEX)(pGraph->pData->lastShowPos - 1);
527 
528  tmp_linePoint.y = (D4D_COOR)(_calc.graphPos.y + _calc.graphSize.cy - D4D_MulDivUU(pGraph->traces[i].pData[lastData], _calc.graphSize.cy, 255));
529  D4D_MoveTo(&tmp_linePoint);
530  }
531  break;
532 
534  tmp_linePoint.x = _calc.curr_Xpos;
535  tmp_linePoint.y = (D4D_COOR)(_calc.graphPos.y + _calc.graphSize.cy - D4D_MulDivUU(pGraph->traces[i].pData[pData->lastShowPos], _calc.graphSize.cy, 255));
536  D4D_MoveTo(&tmp_linePoint);
537  break;
538 
540  if(_calc.curr_Xpos <= (D4D_COOR)(_calc.last_Xpos + 1))
541  tmp_linePoint.x = _calc.curr_Xpos;
542  tmp_linePoint.y = (D4D_COOR)(_calc.graphPos.y + _calc.graphSize.cy);
543  D4D_MoveTo(&tmp_linePoint);
544  break;
545 
547  if(_calc.curr_Xpos <= (D4D_COOR)(_calc.last_Xpos + 1))
548  tmp_linePoint.x = _calc.curr_Xpos;
549  tmp_linePoint.y = (D4D_COOR)(_calc.graphPos.y);
550  D4D_MoveTo(&tmp_linePoint);
551  break;
552 
553  default:
554  break;
555  }
556 
557  // Draw line
558  tmp_linePoint.x = _calc.curr_Xpos;
559  tmp_linePoint.y = (D4D_COOR)(_calc.graphPos.y + _calc.graphSize.cy - D4D_MulDivUU(pGraph->traces[i].pData[pData->lastShowPos], _calc.graphSize.cy, 255));
560 
561  if((((pGraph->traces[i].type & D4D_GRAPH_TRACE_TYPE_MASK) == D4D_GRAPH_TRACE_TYPE_AREA) || ((pGraph->traces[i].type & D4D_GRAPH_TRACE_TYPE_MASK) == D4D_GRAPH_TRACE_TYPE_AREA_INV)) && (_calc.curr_Xpos > (D4D_COOR)(_calc.last_Xpos + 1)))
562  D4D_FillRectTo(&tmp_linePoint, pGraph->traces[i].color);
563  else
564  D4D_LineTo(&tmp_linePoint, pGraph->traces[i].line, pGraph->traces[i].color);
565  }
566 
567  if(++pData->lastShowPos >= pGraph->dataLenght)
568  {
569  pData->lastShowPos = 0;
570  }
571 
572  pData->columnDrawed = _calc.curr_Xpos;
573  pData->xPosCnt++;
574  }
575 
576 }
577 
578 /******************************************************************************
579 * Begin of D4D_GRAPH public functions
580 */
584 /**************************************************************************/
593 {
594  D4D_GRAPH* pGraph = D4D_GET_GRAPH(pObj);
595  Byte traces_cnt=0;
596  Byte i;
597  D4D_INDEX lastData;
598 
599  value = (D4D_GRAPH_VALUE)(((1<<(sizeof(D4D_GRAPH_VALUE)*8))- 1) - value);
600 
601  if(pGraph->pData->lastDataPos == 0)
602  lastData = (D4D_INDEX)(pGraph->dataLenght - 1);
603  else
604  lastData = (D4D_INDEX)(pGraph->pData->lastDataPos - 1);
605 
606 
607  while(pGraph->traces[traces_cnt].pData != NULL)
608  traces_cnt++;
609 
610  if(trace_ix > traces_cnt)
611  return D4D_FALSE;
612 
613  for(i=0;i< traces_cnt;i++)
614  {
615  if(i == trace_ix)
616  {
617  pGraph->traces[i].pData[pGraph->pData->lastDataPos] = value;
618  }else
619  {
620  if(pGraph->pData->xPosCnt)
621  pGraph->traces[i].pData[pGraph->pData->lastDataPos] = 0;
622  else
623  pGraph->traces[i].pData[pGraph->pData->lastDataPos] = pGraph->traces[i].pData[lastData];
624  }
625  }
626 
627  if(pGraph->pData->initData < (pGraph->dataLenght - 1)) {
628  pGraph->pData->initData = (Word)(pGraph->pData->lastDataPos + 1);
629  }
630 
631  if(++pGraph->pData->lastDataPos >= pGraph->dataLenght)
632  pGraph->pData->lastDataPos = 0;
633 
634 
635  if(pGraph->pData->lastDataPos == pGraph->pData->lastShowPos)
636  {
637  if(++pGraph->pData->lastShowPos >= pGraph->dataLenght)
638  pGraph->pData->lastShowPos = 0;
639 
640  pGraph->pData->xPosCnt++;
641  }
642 
644 
645  return D4D_TRUE;
646 }
647 
648 /**************************************************************************/
656 {
657  D4D_GRAPH* pGraph = D4D_GET_GRAPH(pObj);
658  Byte line_cnt=0;
659  Byte i;
660 
661  while(pGraph->traces[line_cnt].pData != NULL)
662  line_cnt++;
663 
664  for(i=0;i< line_cnt;i++)
665  {
666  pGraph->traces[i].pData[pGraph->pData->lastDataPos] = (D4D_GRAPH_VALUE)(((1<<((sizeof(D4D_GRAPH_VALUE)) * 8))- 1) - pValues[i]);
667  }
668 
669  if(pGraph->pData->initData < (pGraph->dataLenght - 1)) {
670  pGraph->pData->initData = (Word)(pGraph->pData->lastDataPos + 1);
671  }
672 
673 
674  if(++pGraph->pData->lastDataPos >= pGraph->dataLenght)
675  pGraph->pData->lastDataPos = 0;
676 
677  if(pGraph->pData->lastDataPos == pGraph->pData->lastShowPos)
678  {
679  if(++pGraph->pData->lastShowPos >= pGraph->dataLenght)
680  pGraph->pData->lastShowPos = 0;
681  pGraph->pData->xPosCnt++;
682  }
683 
684 
686 }
687 
688 /**************************************************************************/
695 {
696  D4D_GRAPH* pGraph = D4D_GET_GRAPH(pObj);
697  D4D_GRAPH_DATA* pData = pGraph->pData;
698  pData->xPosCnt = 0;
699  pData->lastShowPos = 0;
700  pData->lastDataPos = 0;
701  pData->initData = 0;
703 }
704 
705 /**************************************************************************/
712 {
713  return D4D_GET_GRAPH(pObj)->pData->xPosCnt;
714 }
715 
716 /**************************************************************************/
723 {
725  return _calc.graphSize.cx;
726 }
727 
728 /**************************************************************************/
739 {
740  D4D_GRAPH* pGraph = D4D_GET_GRAPH(pObj);
741  D4D_GRAPH_DATA* pData = pGraph->pData;
742 
743  if((mul == 0) || (div == 0))
744  return D4D_FALSE;
745 
747 
748  pData->dataShowX = (D4D_GRAPH_DATA_LEN)D4D_MulDivUU16(mul, _calc.graphSize.cx, div);
749 
751 
752  return D4D_TRUE;
753 }
754 
755 /**************************************************************************/
765 {
766  D4D_GRAPH* pGraph = D4D_GET_GRAPH(pObj);
767  D4D_GRAPH_DATA* pData = pGraph->pData;
768 
769  if(samples == 0)
770  return D4D_FALSE;
771 
772  pData->dataShowX = (D4D_GRAPH_DATA_LEN)samples;
773 
775 
776  return D4D_TRUE;
777 }
778 
779 /******************************************************************************
780 * End of public functions */
782 /******************************************************************************/
783 
784 /**************************************************************/
794 /*******************************************************
795 *
796 * The main GRAPH message handler
797 *
798 *******************************************************/
799 
801 {
802  switch(pMsg->nMsgId)
803  {
804  case D4D_MSG_DRAW:
805  D4D_GraphOnDraw(pMsg);
806  break;
807 #ifdef D4D_LLD_TCH
808  case D4D_MSG_TOUCHED:
809  D4D_FocusSet(pMsg->pScreen, pMsg->pObject);
810  break;
811 #endif
812 
813  case D4D_MSG_ONINIT:
815 
817  D4D_GET_GRAPH(pMsg->pObject)->pData->lblSizeY = D4D_GraphGetSizeLblY(pMsg->pObject);
818 
820 
821  D4D_GET_GRAPH(pMsg->pObject)->pData->initData = 0;
822  D4D_GET_GRAPH(pMsg->pObject)->pData->columnDrawed = (D4D_COOR)(_calc.graphPos.x - 1);
823 
824  if(!D4D_GET_GRAPH(pMsg->pObject)->pData->dataShowX) {
825  D4D_GET_GRAPH(pMsg->pObject)->pData->dataShowX = _calc.graphSize.cx; // initialization of scale for axis X to scale 1:1
826  }
827  break;
828 
829  default:
830  // call the default behavior of all objects
831  D4D_ObjOnMessage(pMsg);
832  }
833 }
834 
835 /**************************************************************/
841 {
842  return &(D4D_GET_GRAPH(pThis)->textBuff);
843 }
844 
D4D_INDEX buffSize
size of text buffer array
Definition: d4d_string.h:103
D4D_WCHAR D4D_TCHAR
Type definition of eGUI character (it depends on UNICODE setting if this is D4D_CHAR or D4D_WCHAR)...
Definition: d4d_types.h:284
static D4D_COOR D4D_GraphGetGridCoorY(D4D_OBJECT *pThis, Byte gridIx)
Definition: d4d_graph.c:189
Word D4D_MulDivUU16(Word u1, Word u2, Word d)
Simple proportion unsigned calculation - 16 bit.
Definition: d4d_math.c:257
D4D_COLOR D4D_ObjectGetBckgFillColor(D4D_OBJECT *pObj)
Function return object current fill background color.
Definition: d4d_scheme.c:225
D4D_COLOR D4D_ObjectGetForeColor(D4D_OBJECT *pObj, D4D_OBJECT_DRAWFLAGS draw)
Function return object current fore color.
Definition: d4d_scheme.c:161
D4D_FONT_TYPE * D4D_GetFont(D4D_FONT ix)
Definition: d4d_font.c:340
D4D_COOR lblSizeY
Definition: d4d_graph.h:204
D4D_TEXT_PROPERTIES text_properties
Text properties structure.
Definition: d4d_string.h:96
D4D_INDEX printLen
Length of string that should be used (printed).
Definition: d4d_string.h:106
D4D_CLR_SCHEME_OBJ objectDepend
Sub structure of object non standard colors.
Definition: d4d_scheme.h:589
Type definition of eGUI point structure.
Definition: d4d_types.h:223
#define D4D_GRAPH_F_MODE_NORMAL
The graph runs in normal mode, this means that a graph adds new data to the screen. When it fills up the whole graph area, the object clears all the shown points and draws a new graph on a screen from new data.
Definition: d4d_graph.h:90
#define D4D_GRAPH_F_VALUE_Y_RIGHT
Enables the label for axis Y on the right side of the graph.
Definition: d4d_graph.h:99
On Init message - is send for first time when the object is inicialized.
Definition: d4d_base.h:370
D4D object messages structure.
Definition: d4d_base.h:400
D4D_COLOR color
Definition: d4d_graph.h:192
D4D_BOOL D4D_GraphSetScaleX(D4D_OBJECT_PTR pObj, Byte mul, Byte div)
Function sets the new scale of axis X of the graph.
Definition: d4d_graph.c:738
D4D_OBJECT_DATA_PTR pData
Pointer on runtime object data.
Definition: d4d_object.h:180
D4D_BOOL D4D_GraphAddTraceData(D4D_OBJECT_PTR pObj, D4D_INDEX trace_ix, D4D_GRAPH_VALUE value)
The function add new data to one trace.
Definition: d4d_graph.c:592
D4D_STRING textBuff
Definition: d4d_graph.h:219
#define D4D_FALSE
This is definition of boolean operation value in eGUI - FALSE.
Definition: d4d_types.h:104
D4D_GRAPH_DATA * pData
Definition: d4d_graph.h:226
The string type. This structure contains all properties about string in eGUI.
Definition: d4d_string.h:100
D4D_GRAPH_VALUE * pData
Definition: d4d_graph.h:191
D4D_COLOR D4D_ObjectGetForeFillColor(D4D_OBJECT *pObj)
Function return object current fill fore color.
Definition: d4d_scheme.c:208
D4D_OBJECT_INITFLAGS initFlags
The initializations object flags.
Definition: d4d_object.h:178
#define D4D_DrawTextRect(ppt, psz, buffText, colorText, colorBkgd)
Function that draw text into defined rectangle on the screen.
static D4D_COOR D4D_GraphGetGridCoorX(D4D_OBJECT *pThis, Byte gridIx)
Definition: d4d_graph.c:183
static void D4D_GraphDrawEmptyGraph(D4D_OBJECT *pThis)
Definition: d4d_graph.c:262
#define D4D_GRAPH_TRACE_TYPE_AREA
The trace fills up the area under measured samples.
Definition: d4d_graph.h:140
static void D4D_GraphValue2Coor(D4D_OBJECT *pThis)
Definition: d4d_graph.c:89
D4D_FONT fontId
index of used font
Definition: d4d_string.h:104
D4D_STRING * D4D_GraphGetTextBuffer(D4D_OBJECT *pThis)
Definition: d4d_graph.c:840
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.
Definition: d4d_types.h:106
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.
struct D4D_OBJECT_S * pObject
Pointer to object who is receiver of this message. If the receiver is just screen this field must be ...
Definition: d4d_base.h:402
D4D Driver main header file.
static void D4D_GraphUpdateTempPosX(D4D_OBJECT *pThis)
Definition: d4d_graph.c:76
D4D_OBJECT_FLAGS flags
runtime object flags
Definition: d4d_object.h:145
D4D_INDEX y_cnt
Definition: d4d_graph.h:212
The string properties type. This structure contains as Font as Text properties.
Definition: d4d_string.h:93
D4D_COOR D4D_GraphGetSizeX(D4D_OBJECT_PTR pObj)
The function returns the size of graph traces in axis X.
Definition: d4d_graph.c:722
Word D4D_GRAPH_DATA_LEN
Definition: d4d_graph.h:186
#define D4D_OBJECT_DRAWFLAGS_COMPLETE
Draw complete flag.
Definition: d4d_base.h:361
#define D4D_GRAPH_F_VALUE_Y_LEFT
Enables the label for axis Y on the left side of the graph.
Definition: d4d_graph.h:98
#define D4D_SCRATCHPAD_SIZE
Call back function raised by any new input event (touch, mouse, keys).
Definition: d4d_base.h:579
D4D_COLOR grid
The graph grid color.
Definition: d4d_scheme.h:550
void D4D_GraphOnMessage(D4D_MESSAGE *pMsg)
Definition: d4d_graph.c:800
#define D4D_GRAPH_F_VALUE_X_BOTT
Enables a label for axis X on the bottom side of the graph.
Definition: d4d_graph.h:94
D4D Driver private header file.
void D4D_FillRectTo(D4D_POINT *ppt, D4D_COLOR color)
Function draw filled rectangle on the screen.
#define D4D_DEFSTR(str)
Macro that helps declare the strings in eGUI.
Definition: d4d_string.h:246
D4D_COOR cx
Size in axis X (width)
Definition: d4d_types.h:232
D4D_INDEX drigDrawedX
Definition: d4d_graph.h:206
Byte D4D_COOR
Type definition of eGUI coordination variables.
Definition: d4d_types.h:219
D4D_POINT position
Position on the screen/object.
Definition: d4d_object.h:169
#define D4D_GRAPH_TRACE_TYPE_AREA_INV
The trace fills up the area of measured samples.
Definition: d4d_graph.h:141
D4D_LINETYPE line
Definition: d4d_graph.h:193
D4D_GRAPH_DATA_LEN lastShowPos
Definition: d4d_graph.h:200
#define D4D_OBJECT_DRAWFLAGS_STATE
Draw just change of state flag.
Definition: d4d_base.h:364
D4D_COOR radius
Object corners radius.
Definition: d4d_object.h:171
D4D_GRAPH_SAMPLE_IX xPosCnt
Definition: d4d_graph.h:199
unsigned char Byte
Type definition of Byte (unsigned 8-bit).
Definition: d4d_types.h:151
D4D_BOOL D4D_GraphSetDataWidth(D4D_OBJECT_PTR pObj, D4D_INDEX samples)
Function sets the new scale of the axis X of the graph.
Definition: d4d_graph.c:764
void D4D_FillRectToXY(D4D_COOR x, D4D_COOR y, D4D_COLOR color)
Function draw filled rectangle on the screen.
void D4D_ObjOnMessage(D4D_MESSAGE *pMsg)
Definition: d4d_object.c:443
const D4D_OBJECT_SYS_FUNCTION d4d_graphSysFunc
Definition: d4d_graph.c:53
#define D4D_GRAPH_TRACE_TYPE_LINE
The trace looks like a normal line, all individual sample points are connected by the lines...
Definition: d4d_graph.h:138
D4D_GRAPH_DATA_LEN lastDataPos
Definition: d4d_graph.h:201
D4D_CLR_SCHEME_GRAPH graph
The non standard colors of graph object.
Definition: d4d_scheme.h:570
void D4D_FocusSet(const D4D_SCREEN *pScreen, D4D_OBJECT_PTR pObject)
The function set the obejct focus to new object.
Definition: d4d_screen.c:430
D4D_INDEX D4D_GetTextLength(D4D_TCHAR *pText)
The function returns lenght of text.
Definition: d4d_string.c:329
#define NULL
Type definition of null pointer.
Definition: d4d_types.h:184
#define D4D_ASSERT(cond)
Definition: d4d_base.h:583
D4D_CLR_SCHEME * D4D_ObjectGetScheme(D4D_OBJECT *pObj)
Function return the pointer to current use object scheme of object.
Definition: d4d_scheme.c:109
D4D_TCHAR * pText
pointer to text array
Definition: d4d_string.h:102
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.
unsigned long LWord
Type definition of LWord (unsigned 32-bit).
Definition: d4d_types.h:167
D4D_STR_PROPERTIES * str_properties
pointer to string properties
Definition: d4d_string.h:105
D4D_COOR y
Coordination in axis Y.
Definition: d4d_types.h:226
#define D4D_OBJECT_F_NOTINIT
Definition: d4d_object.h:113
#define D4D_GRAPH_BORDER_OFF
This is offset of graph area from object borders. If not defined, it sets to 5 pixel as a default...
Definition: d4d_graph.h:61
D4D_MSGID nMsgId
Type of message.
Definition: d4d_base.h:404
D4D_SIZE size
Size of the object.
Definition: d4d_object.h:170
Byte D4D_GRAPH_VALUE
Type definition of graph value type - this is standard type used for graph data input.
Definition: d4d_graph.h:154
#define D4D_GRAPH_VALUE_OFF
This is offset of value text from graph area borders. If not defined, it sets to 2 pixel as a default...
Definition: d4d_graph.h:67
D4D_GRAPH_DATA_LEN dataShowX
Definition: d4d_graph.h:203
D4D_POINT D4D_GetClientToScreenPoint(D4D_OBJECT *pObject, D4D_POINT *nClientPoint)
The function convert client point on the screen to the global screen point.
Definition: d4d_screen.c:536
#define D4D_GRAPH_TRACE_TYPE_MASK
Just mask of type range (it&#39;s used internaly by driver)
Definition: d4d_graph.h:137
LWord D4D_INDEX
Type definition of eGUI general index variables.
Definition: d4d_types.h:206
The object main structure type definition.
Definition: d4d_object.h:167
Draw message - is send when the object should be redrawed.
Definition: d4d_base.h:371
static D4D_COOR D4D_GraphGetSizeLblY(D4D_OBJECT *pThis)
Definition: d4d_graph.c:161
D4D_GRAPH_DATA_LEN dataLenght
Definition: d4d_graph.h:222
LWord D4D_GRAPH_SAMPLE_IX
Type definition of graph dat asample type.
Definition: d4d_graph.h:156
#define D4D_ALIGN_H_CENTER_MASK
The horizontal center aligment option mask (for texts and also bitmaps).
Definition: d4d_base.h:225
D4D_GRAPH_GRID grid
Definition: d4d_graph.h:220
void D4D_ComputeGeometry(D4D_GEOMETRY *pGeometry, D4D_OBJECT *pObject)
Definition: d4d_base.c:1047
D4D_COOR cy
Size in axis Y (height)
Definition: d4d_types.h:233
The object system function needed for each object - this is part of D4D_OBJECT main structure...
Definition: d4d_object.h:134
static void D4D_GraphPrintLabel(D4D_OBJECT *pThis, D4D_BOOL axisX, Byte gridIx, D4D_GRAPH_SAMPLE_IX sampleIx)
Definition: d4d_graph.c:196
#define _calc
Definition: d4d_graph.c:74
D4D_FONT labelFont
Definition: d4d_graph.h:223
D4D_GRAPH_DATA_LEN initData
Definition: d4d_graph.h:202
Touched message - is send when the object is touched by touch screen driver.
Definition: d4d_base.h:379
LWord D4D_BOOL
Type definition of eGUI boolean.
Definition: d4d_types.h:204
Byte D4D_SprintDecU8(Byte val, D4D_TCHAR *pText, D4D_TCHAR fill)
The function convert decimal unsigned 8 bit number to string.
Definition: d4d_string.c:262
Type definition of eGUI size structure.
Definition: d4d_types.h:230
#define D4D_GRAPH_F_MODE_ROLLOVER
The graph runs in roll-over mode, this means the graph adds new data to the screen. When it fills up the whole graph area, the graph clears only the latest sample and draws a new one instead of the cleared one.
Definition: d4d_graph.h:91
static void D4D_GraphOnDraw(D4D_MESSAGE *pMsg)
Definition: d4d_graph.c:312
D4D_FONT_SIZE D4D_GetFontWidth(D4D_FONT ix)
Definition: d4d_font.c:398
D4D_GRAPH_ON_NEED_LABEL OnNeedLabelText
Definition: d4d_graph.h:224
D4D_OBJECT_DRAWFLAGS draw
Contains draw flags - is valid with D4D_MSG_DRAW and D4D_MSG_DRAWDONE message.
Definition: d4d_base.h:408
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.
#define D4D_GRAPH_F_MODE_MASK
Mask of graph mode (it&#39;s used internaly by driver)
Definition: d4d_graph.h:89
#define D4D_GRAPH_F_VALUE_X_TOP
Enables the label for axis X on the top side of the graph.
Definition: d4d_graph.h:95
void D4D_GraphAddTracesData(D4D_OBJECT_PTR pObj, D4D_GRAPH_VALUE *pValues)
The function add new data to all traces.
Definition: d4d_graph.c:655
Type definition of eGUI geometry structure.
Definition: d4d_types.h:237
Line type thin.
Definition: d4d_types.h:293
const D4D_GRAPH_TRACE * traces
Definition: d4d_graph.h:221
D4D_INDEX x_cnt
Definition: d4d_graph.h:211
void D4D_InvalidateObject(D4D_OBJECT_PTR pObject, D4D_BOOL bComplete)
Function invalidate object to redraw on screen.
Definition: d4d_object.c:71
#define D4D_GET_GRAPH(pObj)
Definition: d4d_graph.h:234
#define D4D_MulDivUU
Definition: d4d_math.h:103
void D4D_LineToXY(D4D_COOR x, D4D_COOR y, D4D_LINETYPE ltype, D4D_COLOR color)
Function draw line on the screen.
void D4D_GraphClearAll(D4D_OBJECT_PTR pObj)
The function clears all internal data of graph object.
Definition: d4d_graph.c:694
Byte D4D_OBJECT_DRAWFLAGS
Drawing object flags type, handled to object in D4D_MSG_DRAW events.
Definition: d4d_base.h:359
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.
Definition: d4d_types.h:262
Byte D4D_SprintDecU16(Word val, D4D_TCHAR *pText, D4D_TCHAR fill)
The function convert decimal unsigned 16 bit number to string.
Definition: d4d_string.c:201
struct D4D_SCREEN_S * pScreen
Pointer to screen who is receiver of this message.
Definition: d4d_base.h:403
D4D_COLOR D4D_GetGreyScale(D4D_COLOR color)
Compute the grayscale color.
Definition: d4d_scheme.c:333
D4D_FONT_PROPERTIES font_properties
Font properties structure.
Definition: d4d_string.h:95
D4D_COOR columnDrawed
Definition: d4d_graph.h:205
D4D_FONT_SIZE D4D_GetFontHeight(D4D_FONT ix)
Definition: d4d_font.c:381
void D4D_MoveTo(D4D_POINT *ppt)
Function move logic cursor to new position.
unsigned short Word
Type definition of Word (unsigned 16-bit).
Definition: d4d_types.h:159
D4D_INDEX printOff
Offset of string that should be used (printed).
Definition: d4d_string.h:107
D4D_COOR x
Coordination in axis X.
Definition: d4d_types.h:225
#define D4D_GRAPH_TRACE_TYPE_DOT
The trace is drawn only from measured points.
Definition: d4d_graph.h:139
union D4D_MESSAGE_S::@0 prm
Additional data for some type of messages.
D4D_BOOL D4D_IsEnabled(D4D_OBJECT *pObject)
Function find out if the object is enabled or not.
Definition: d4d_object.c:303
#define D4D_GRAPH_LBL_FNT_PRTY_DEFAULT
This is graph labels init font properties. If not defined, it sets to ( 0 ) as a default.
Definition: d4d_graph.h:123
LWord D4D_GraphGetSampleIndex(D4D_OBJECT_PTR pObj)
The function returns the current data sample index.
Definition: d4d_graph.c:711