diff options
author | Joel Bodenmann <joel@unormal.org> | 2013-11-10 21:07:16 +0100 |
---|---|---|
committer | Joel Bodenmann <joel@unormal.org> | 2013-11-10 21:07:16 +0100 |
commit | da2740b706d720292113445ee1db30f8a9873dc4 (patch) | |
tree | 8f8b1902d4af6a23b3daf26990f580b76ea31ea4 /src/gwin/graph.c | |
parent | 6ca3537a696e7ace8098771a9a7105380604253d (diff) | |
parent | a8ce005e2621b0108863297948cea0fa52c8bf2a (diff) | |
download | uGFX-da2740b706d720292113445ee1db30f8a9873dc4.tar.gz uGFX-da2740b706d720292113445ee1db30f8a9873dc4.tar.bz2 uGFX-da2740b706d720292113445ee1db30f8a9873dc4.zip |
merging GDISPStreaming
Diffstat (limited to 'src/gwin/graph.c')
-rw-r--r-- | src/gwin/graph.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/gwin/graph.c b/src/gwin/graph.c index 8cab05a4..1d513290 100644 --- a/src/gwin/graph.c +++ b/src/gwin/graph.c @@ -46,22 +46,22 @@ static void pointto(GGraphObject *gg, coord_t x, coord_t y, const GGraphPointSty y = gg->g.y + gg->g.height - 1 - gg->yorigin - y; if (style->size <= 1) { - gdispDrawPixel(x, y, style->color); + gdispGDrawPixel(gg->g.display, x, y, style->color); return; } switch(style->type) { case GGRAPH_POINT_SQUARE: - gdispDrawBox(x-style->size, y-style->size, 2*style->size, 2*style->size, style->color); + gdispGDrawBox(gg->g.display, x-style->size, y-style->size, 2*style->size, 2*style->size, style->color); break; #if GDISP_NEED_CIRCLE case GGRAPH_POINT_CIRCLE: - gdispDrawCircle(x, y, style->size, style->color); + gdispGDrawCircle(gg->g.display, x, y, style->size, style->color); break; #endif case GGRAPH_POINT_DOT: default: - gdispDrawPixel(x, y, style->color); + gdispGDrawPixel(gg->g.display, x, y, style->color); break; } } @@ -83,7 +83,7 @@ static void lineto(GGraphObject *gg, coord_t x0, coord_t y0, coord_t x1, coord_t if (style->size <= 0) { // Use the driver to draw a solid line - gdispDrawLine(x0, y0, x1, y1, style->color); + gdispGDrawLine(gg->g.display, x0, y0, x1, y1, style->color); return; } @@ -101,7 +101,7 @@ static void lineto(GGraphObject *gg, coord_t x0, coord_t y0, coord_t x1, coord_t case GGRAPH_LINE_SOLID: default: // Use the driver to draw a solid line - gdispDrawLine(x0, y0, x1, y1, style->color); + gdispGDrawLine(gg->g.display, x0, y0, x1, y1, style->color); return; } @@ -131,7 +131,7 @@ static void lineto(GGraphObject *gg, coord_t x0, coord_t y0, coord_t x1, coord_t if (run++ >= 0) { if (run >= run_on) run = run_off; - gdispDrawPixel(x0, y0, style->color); + gdispGDrawPixel(gg->g.display, x0, y0, style->color); } if (P < 0) { P += dy; @@ -151,7 +151,7 @@ static void lineto(GGraphObject *gg, coord_t x0, coord_t y0, coord_t x1, coord_t if (run++ >= 0) { if (run >= run_on) run = run_off; - gdispDrawPixel(x0, y0, style->color); + gdispGDrawPixel(gg->g.display, x0, y0, style->color); } if (P < 0) { P += dx; @@ -165,8 +165,8 @@ static void lineto(GGraphObject *gg, coord_t x0, coord_t y0, coord_t x1, coord_t } } -GHandle gwinGraphCreate(GGraphObject *gg, const GWindowInit *pInit) { - if (!(gg = (GGraphObject *)_gwindowCreate(&gg->g, pInit, &graphVMT, 0))) +GHandle gwinGGraphCreate(GDisplay *g, GGraphObject *gg, const GWindowInit *pInit) { + if (!(gg = (GGraphObject *)_gwindowCreate(g, &gg->g, pInit, &graphVMT, 0))) return 0; gg->xorigin = gg->yorigin = 0; gg->lastx = gg->lasty = 0; |