aboutsummaryrefslogtreecommitdiffstats
path: root/src/gwin/graph.c
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2013-10-24 18:36:11 +1000
committerinmarket <andrewh@inmarket.com.au>2013-10-24 18:36:11 +1000
commit7a7e223d152b42553f7e6ce0220dd5d736b89c56 (patch)
tree22968b7c8e779a66a2eba431545b5b292fe722cc /src/gwin/graph.c
parenta28dce97d877160b10a3683fbf8ea578c8405417 (diff)
downloaduGFX-7a7e223d152b42553f7e6ce0220dd5d736b89c56.tar.gz
uGFX-7a7e223d152b42553f7e6ce0220dd5d736b89c56.tar.bz2
uGFX-7a7e223d152b42553f7e6ce0220dd5d736b89c56.zip
Add multiple display support to GWIN.
You can now create windows on multiple displays.
Diffstat (limited to 'src/gwin/graph.c')
-rw-r--r--src/gwin/graph.c20
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;