Index: uspace/lib/congfx/src/console.c
===================================================================
--- uspace/lib/congfx/src/console.c	(revision 1822545095edd9f4723bf932de051361380e1215)
+++ uspace/lib/congfx/src/console.c	(revision be15256dedca4e5ededf91be5e6ece8445b5a118)
@@ -40,4 +40,5 @@
 #include <congfx/console.h>
 #include <gfx/context.h>
+#include <gfx/coord.h>
 #include <gfx/render.h>
 #include <io/pixel.h>
@@ -191,5 +192,5 @@
 	console_gc_t *cgc = (console_gc_t *) arg;
 	console_gc_bitmap_t *cbm = NULL;
-	gfx_coord_t w, h;
+	gfx_coord2_t dim;
 	errno_t rc;
 
@@ -198,12 +199,11 @@
 		return ENOMEM;
 
-	w = params->rect.p1.x - params->rect.p0.x;
-	h = params->rect.p1.y - params->rect.p0.y;
+	gfx_coord2_subtract(&params->rect.p1, &params->rect.p0, &dim);
 	cbm->rect = params->rect;
 
 	if (alloc == NULL) {
-		cbm->alloc.pitch = w * sizeof(uint32_t);
+		cbm->alloc.pitch = dim.x * sizeof(uint32_t);
 		cbm->alloc.off0 = 0;
-		cbm->alloc.pixels = calloc(w * h, sizeof(uint32_t));
+		cbm->alloc.pixels = calloc(dim.x * dim.y, sizeof(uint32_t));
 		if (cbm->alloc.pixels == NULL) {
 			rc = ENOMEM;
@@ -271,8 +271,5 @@
 
 	// XXX Add function to translate rectangle
-	drect.p0.x = srect.p0.x + offs.x;
-	drect.p0.y = srect.p0.y + offs.y;
-	drect.p1.x = srect.p1.x + offs.x;
-	drect.p1.y = srect.p1.y + offs.y;
+	gfx_rect_translate(&offs, &srect, &drect);
 
 	pixelmap.width = cbm->rect.p1.x - cbm->rect.p0.x;
@@ -313,5 +310,4 @@
 }
 
-
 /** @}
  */
