aboutsummaryrefslogtreecommitdiffstats
path: root/demos/modules/graph/main.c
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@unormal.org>2013-02-11 09:25:26 +0100
committerJoel Bodenmann <joel@unormal.org>2013-02-11 09:25:26 +0100
commit885b3d53b3a491c62fb0634b78cb9857723ac15d (patch)
tree4b825dc642cb6eb9a060e54bf8d69288fbee4904 /demos/modules/graph/main.c
parent851e5fb09bdc086d734647128fd3051c3a8528e2 (diff)
downloaduGFX-885b3d53b3a491c62fb0634b78cb9857723ac15d.tar.gz
uGFX-885b3d53b3a491c62fb0634b78cb9857723ac15d.tar.bz2
uGFX-885b3d53b3a491c62fb0634b78cb9857723ac15d.zip
removed GDISP_LLD() macro
Diffstat (limited to 'demos/modules/graph/main.c')
-rw-r--r--demos/modules/graph/main.c71
1 files changed, 0 insertions, 71 deletions
diff --git a/demos/modules/graph/main.c b/demos/modules/graph/main.c
deleted file mode 100644
index 544d4c2b..00000000
--- a/demos/modules/graph/main.c
+++ /dev/null
@@ -1,71 +0,0 @@
-#include "ch.h"
-#include "hal.h"
-#include "gfx.h"
-#include "math.h"
-
-const GGraphPoint data[5] = {
- { -40, -40 },
- { 70, 40 },
- { 140, 60 },
- { 210, 60 },
- { 280, 200 }
-};
-
-GGraphObject g;
-
-GGraphStyle GraphStyle1 = {
- { GGRAPH_POINT_DOT, 0, Blue }, // point
- { GGRAPH_LINE_NONE, 2, Gray }, // line
- { GGRAPH_LINE_SOLID, 0, White }, // x axis
- { GGRAPH_LINE_SOLID, 0, White }, // y axis
- { GGRAPH_LINE_DASH, 5, Gray, 50 }, // x grid
- { GGRAPH_LINE_DOT, 7, Yellow, 50 }, // y grid
- GWIN_GRAPH_STYLE_POSITIVE_AXIS_ARROWS // flags
-};
-
-GGraphStyle GraphStyle2 = {
- { GGRAPH_POINT_SQUARE, 5, Red }, // point
- { GGRAPH_LINE_DOT, 2, Pink }, // line
- { GGRAPH_LINE_SOLID, 0, White }, // x axis
- { GGRAPH_LINE_SOLID, 0, White }, // y axis
- { GGRAPH_LINE_DASH, 5, Gray, 50 }, // x grid
- { GGRAPH_LINE_DOT, 7, Yellow, 50 }, // y grid
- GWIN_GRAPH_STYLE_POSITIVE_AXIS_ARROWS // flags
-};
-
-int main(void) {
- GHandle gh;
- uint16_t i;
-
- halInit();
- chSysInit();
-
- gdispInit();
- gdispClear(Black);
-
- gh = gwinCreateGraph(&g, 0, 0, gdispGetWidth(), gdispGetHeight());
-
- gwinGraphSetOrigin(gh, gwinGetWidth(gh)/2, gwinGetHeight(gh)/2);
- gwinGraphSetStyle(gh, &GraphStyle1);
- gwinGraphDrawAxis(gh);
-
- for(i = 0; i < gwinGetWidth(gh); i++)
- gwinGraphDrawPoint(gh, i-gwinGetWidth(gh)/2, 80*sin(2*0.2*M_PI*i/180));
-
- gwinGraphStartSet(gh);
- GraphStyle1.point.color = Green;
- gwinGraphSetStyle(gh, &GraphStyle1);
-
- for(i = 0; i < gwinGetWidth(gh)*5; i++)
- gwinGraphDrawPoint(gh, i/5-gwinGetWidth(gh)/2, 95*sin(2*0.2*M_PI*i/180));
-
- gwinGraphStartSet(gh);
- gwinGraphSetStyle(gh, &GraphStyle2);
-
- gwinGraphDrawPoints(gh, data, sizeof(data)/sizeof(data[0]));
-
- while(TRUE) {
- chThdSleepMilliseconds(100);
- }
-}
-