summaryrefslogtreecommitdiffstats
path: root/libdimension/canvas.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2011-10-19 13:59:24 -0400
committerTavian Barnes <tavianator@gmail.com>2011-10-30 18:11:22 -0400
commit8e3a7158ecae541692826e7b5998c8ffc810173a (patch)
treebeda4f9f8604f77d0513d5fb02b7ddf53d203d09 /libdimension/canvas.c
parente9810a7b1aae15320e58371b657a2f963562834d (diff)
downloaddimension-8e3a7158ecae541692826e7b5998c8ffc810173a.tar.xz
Make API more consistent.
Object methods should be dmnsn_<object>_<fn>().
Diffstat (limited to 'libdimension/canvas.c')
-rw-r--r--libdimension/canvas.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libdimension/canvas.c b/libdimension/canvas.c
index 7d25601..c0e8b2b 100644
--- a/libdimension/canvas.c
+++ b/libdimension/canvas.c
@@ -23,7 +23,7 @@
* Canveses.
*/
-#include "dimension.h"
+#include "dimension-internal.h"
#include <stdlib.h> /* For dmnsn_free() */
/* Allocate a new canvas, of width x and height y */
@@ -62,15 +62,15 @@ dmnsn_delete_canvas(dmnsn_canvas *canvas)
/* Set a canvas optimizer */
void
-dmnsn_optimize_canvas(dmnsn_canvas *canvas, dmnsn_canvas_optimizer optimizer)
+dmnsn_canvas_optimize(dmnsn_canvas *canvas, dmnsn_canvas_optimizer optimizer)
{
dmnsn_array_push(canvas->optimizers, &optimizer);
}
/* Set the color of a pixel */
void
-dmnsn_set_pixel(dmnsn_canvas *canvas, size_t x, size_t y,
- dmnsn_color color)
+dmnsn_canvas_set_pixel(dmnsn_canvas *canvas, size_t x, size_t y,
+ dmnsn_color color)
{
dmnsn_assert(x < canvas->width && y < canvas->height,
"Canvas access out of bounds.");
@@ -86,11 +86,11 @@ dmnsn_set_pixel(dmnsn_canvas *canvas, size_t x, size_t y,
/* Fill a canvas with a solid color */
void
-dmnsn_clear_canvas(dmnsn_canvas *canvas, dmnsn_color color)
+dmnsn_canvas_clear(dmnsn_canvas *canvas, dmnsn_color color)
{
for (size_t x = 0; x < canvas->width; ++x) {
for (size_t y = 0; y < canvas->height; ++y) {
- dmnsn_set_pixel(canvas, x, y, color);
+ dmnsn_canvas_set_pixel(canvas, x, y, color);
}
}
}