summaryrefslogtreecommitdiffstats
path: root/libdimension
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2009-04-12 15:41:29 +0000
committerTavian Barnes <tavianator@gmail.com>2009-04-12 15:41:29 +0000
commit510c9a95fb5f3f4a40a19ce66c95344c2013085f (patch)
tree4f69c12e773da63b2f5d7c116bd241043de24003 /libdimension
parentbef2ee297d3492c8a54e61fe498e6eda518da250 (diff)
downloaddimension-510c9a95fb5f3f4a40a19ce66c95344c2013085f.tar.xz
Change argument order of dmnsn_set_pixel; write C++ canvas wrapper.
Diffstat (limited to 'libdimension')
-rw-r--r--libdimension/canvas.c4
-rw-r--r--libdimension/dimension/canvas.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/libdimension/canvas.c b/libdimension/canvas.c
index 257f1a9..49096fc 100644
--- a/libdimension/canvas.c
+++ b/libdimension/canvas.c
@@ -111,8 +111,8 @@ dmnsn_get_pixel(const dmnsn_canvas *canvas, unsigned int x, unsigned int y)
}
void
-dmnsn_set_pixel(dmnsn_canvas *canvas, dmnsn_color color,
- unsigned int x, unsigned int y)
+dmnsn_set_pixel(dmnsn_canvas *canvas,
+ unsigned int x, unsigned int y, dmnsn_color color)
{
dmnsn_wrlock_pixel(canvas, x, y);
canvas->pixels[y*canvas->x + x] = color;
diff --git a/libdimension/dimension/canvas.h b/libdimension/dimension/canvas.h
index 9a70327..4449403 100644
--- a/libdimension/dimension/canvas.h
+++ b/libdimension/dimension/canvas.h
@@ -46,8 +46,8 @@ void dmnsn_delete_canvas(dmnsn_canvas *canvas);
/* These handle the rwlocks correctly */
dmnsn_color dmnsn_get_pixel(const dmnsn_canvas *canvas,
unsigned int x, unsigned int y);
-void dmnsn_set_pixel(dmnsn_canvas *canvas, dmnsn_color color,
- unsigned int x, unsigned int y);
+void dmnsn_set_pixel(dmnsn_canvas *canvas,
+ unsigned int x, unsigned int y, dmnsn_color color);
/* Manual locking */
void dmnsn_rdlock_pixel(const dmnsn_canvas *canvas,