diff options
author | inmarket <andrewh@inmarket.com.au> | 2018-07-08 10:54:19 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2018-07-08 10:54:19 +1000 |
commit | 2ab2d77fcba42467b62f2be732cb8dc00510fe19 (patch) | |
tree | 8dbd616faa116a2946ad47c62c20d4a34fb749b2 /src/gdisp/gdisp_pixmap.c | |
parent | 7e95acb7310d83284288a6e89a6b3fe4bf4e8668 (diff) | |
download | uGFX-2ab2d77fcba42467b62f2be732cb8dc00510fe19.tar.gz uGFX-2ab2d77fcba42467b62f2be732cb8dc00510fe19.tar.bz2 uGFX-2ab2d77fcba42467b62f2be732cb8dc00510fe19.zip |
Change coord_t to gCoord
Diffstat (limited to 'src/gdisp/gdisp_pixmap.c')
-rw-r--r-- | src/gdisp/gdisp_pixmap.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/gdisp/gdisp_pixmap.c b/src/gdisp/gdisp_pixmap.c index 88bd57a3..081db8d3 100644 --- a/src/gdisp/gdisp_pixmap.c +++ b/src/gdisp/gdisp_pixmap.c @@ -49,15 +49,15 @@ typedef struct pixmap { color_t pixels[1]; // We really want pixels[0] but some compilers don't allow that even though it is C standard. } pixmap; -GDisplay *gdispPixmapCreate(coord_t width, coord_t height) { +GDisplay *gdispPixmapCreate(gCoord width, gCoord height) { GDisplay *g; pixmap *p; unsigned i; // Calculate the size of the display surface in bytes i = width*height*sizeof(color_t); - if (i < 2*sizeof(coord_t)) - i = 2*sizeof(coord_t); + if (i < 2*sizeof(gCoord)) + i = 2*sizeof(gCoord); // Allocate the pixmap if (!(p = gfxAlloc(i+sizeof(pixmap)-sizeof(p->pixels)))) @@ -76,8 +76,8 @@ GDisplay *gdispPixmapCreate(coord_t width, coord_t height) { #endif // Save the width and height so the driver can retrieve it. - ((coord_t *)p->pixels)[0] = width; - ((coord_t *)p->pixels)[1] = height; + ((gCoord *)p->pixels)[0] = width; + ((gCoord *)p->pixels)[1] = height; // Register the driver g = (GDisplay *)gdriverRegister(&GDISPVMT_pixmap->d, p); @@ -118,8 +118,8 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) { // Initialize the GDISP structure // Width and height were saved into the start of the framebuffer. - g->g.Width = ((coord_t *)((pixmap *)g->priv)->pixels)[0]; - g->g.Height = ((coord_t *)((pixmap *)g->priv)->pixels)[1]; + g->g.Width = ((gCoord *)((pixmap *)g->priv)->pixels)[0]; + g->g.Height = ((gCoord *)((pixmap *)g->priv)->pixels)[1]; g->g.Backlight = 100; g->g.Contrast = 50; g->g.Orientation = GDISP_ROTATE_0; @@ -195,7 +195,7 @@ LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay *g) { case GDISP_ROTATE_0: case GDISP_ROTATE_180: if (g->g.Orientation == GDISP_ROTATE_90 || g->g.Orientation == GDISP_ROTATE_270) { - coord_t tmp; + gCoord tmp; tmp = g->g.Width; g->g.Width = g->g.Height; @@ -205,7 +205,7 @@ LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay *g) { case GDISP_ROTATE_90: case GDISP_ROTATE_270: if (g->g.Orientation == GDISP_ROTATE_0 || g->g.Orientation == GDISP_ROTATE_180) { - coord_t tmp; + gCoord tmp; tmp = g->g.Width; g->g.Width = g->g.Height; |