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/gimage.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/gimage.c')
-rw-r--r-- | src/gwin/gimage.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/gwin/gimage.c b/src/gwin/gimage.c index 8eed3ac7..b1f8e078 100644 --- a/src/gwin/gimage.c +++ b/src/gwin/gimage.c @@ -51,7 +51,7 @@ static void _redraw(GHandle gh) { // If the image isn't open just clear the area if (!gdispImageIsOpen(&widget(gh)->image)) { - gdispFillArea(x, y, w, h, bg); + gdispGFillArea(gh->display, x, y, w, h, bg); return; } @@ -61,8 +61,8 @@ static void _redraw(GHandle gh) { dx = (gh->width-w)/2; x += dx; if (dx) - gdispFillArea(gh->x, y, dx, h, bg); - gdispFillArea(x+w, y, gh->width-dx-w, h, bg); + gdispGFillArea(gh->display, gh->x, y, dx, h, bg); + gdispGFillArea(gh->display, x+w, y, gh->width-dx-w, h, bg); dx = 0; } @@ -77,8 +77,8 @@ static void _redraw(GHandle gh) { dy = (gh->height-h)/2; y += dy; if (dy) - gdispFillArea(x, gh->y, w, dy, bg); - gdispFillArea(x, y+h, w, gh->height-dy-h, bg); + gdispGFillArea(gh->display, x, gh->y, w, dy, bg); + gdispGFillArea(gh->display, x, y+h, w, gh->height-dy-h, bg); dy = 0; } @@ -91,7 +91,7 @@ static void _redraw(GHandle gh) { gdispImageSetBgColor(&widget(gh)->image, bg); // Display the image - gdispImageDraw(&widget(gh)->image, x, y, w, h, dx, dy); + gdispGImageDraw(gh->display, &widget(gh)->image, x, y, w, h, dx, dy); #if GWIN_NEED_IMAGE_ANIMATION // read the delay for the next frame @@ -122,8 +122,8 @@ static const gwinVMT imageVMT = { 0, // The after-clear routine }; -GHandle gwinImageCreate(GImageObject *gobj, GWindowInit *pInit) { - if (!(gobj = (GImageObject *)_gwindowCreate(&gobj->g, pInit, &imageVMT, 0))) +GHandle gwinGImageCreate(GDisplay *g, GImageObject *gobj, GWindowInit *pInit) { + if (!(gobj = (GImageObject *)_gwindowCreate(g, &gobj->g, pInit, &imageVMT, 0))) return 0; // Ensure the gdispImageIsOpen() gives valid results @@ -153,7 +153,7 @@ bool_t gwinImageOpenMemory(GHandle gh, const void* memory) { // Setting the clip here shouldn't be necessary if the redraw doesn't overdraw // but we put it in for safety anyway #if GDISP_NEED_CLIP - gdispSetClip(gh->x, gh->y, gh->width, gh->height); + gdispGSetClip(gh->display, gh->x, gh->y, gh->width, gh->height); #endif _redraw(gh); } @@ -176,7 +176,7 @@ bool_t gwinImageOpenFile(GHandle gh, const char* filename) { // Setting the clip here shouldn't be necessary if the redraw doesn't overdraw // but we put it in for safety anyway #if GDISP_NEED_CLIP - gdispSetClip(gh->x, gh->y, gh->width, gh->height); + gdispGSetClip(gh->display, gh->x, gh->y, gh->width, gh->height); #endif _redraw(gh); } @@ -200,7 +200,7 @@ bool_t gwinImageOpenStream(GHandle gh, void *streamPtr) { // Setting the clip here shouldn't be necessary if the redraw doesn't overdraw // but we put it in for safety anyway #if GDISP_NEED_CLIP - gdispSetClip(gh->x, gh->y, gh->width, gh->height); + gdispGSetClip(gh->display, gh->x, gh->y, gh->width, gh->height); #endif _redraw(gh); } |