/*#*
*#* $Log$
+ *#* Revision 1.13 2006/04/11 00:08:24 bernie
+ *#* text_offset(): New function, but I'm not quite confident with the design.
+ *#*
*#* Revision 1.12 2006/03/27 04:48:56 bernie
*#* gfx_blitImage(): New function; gfx_blitRaster(): Fix clipping bug.
*#*
coord_t width; /*!< Raster width in pixels. */
coord_t height; /*!< Raster height in pixels. */
coord_t stride; /*!< Bytes per row. */
-};
+} Image;
#if CONFIG_BITMAP_FMT == BITMAP_FMT_PLANAR_H_MSB
/**
/*#*
*#* $Log$
+ *#* Revision 1.9 2006/04/11 00:08:24 bernie
+ *#* text_offset(): New function, but I'm not quite confident with the design.
+ *#*
*#* Revision 1.8 2006/03/22 09:50:37 bernie
*#* Use the same format for fonts and rasters.
*#*
/*! ANSI escape sequences flag: true for ESC state on */
static bool ansi_mode = false;
+// FIXME: move in bitmap?
+static coord_t text_xoff, text_yoff;
+
+void text_offset(Bitmap *bm, coord_t x, coord_t y)
+{
+ text_xoff = x;
+ text_yoff = y;
+}
/*!
* Move (imaginary) cursor to column and row specified.
ASSERT(row >= 0);
ASSERT(row < bm->height / bm->font->height);
- bm->penX = col * bm->font->width;
- bm->penY = row * bm->font->height;
+ bm->penX = col * bm->font->width + text_xoff;
+ bm->penY = row * bm->font->height + text_yoff;
}
/*#*
*#* $Log$
+ *#* Revision 1.5 2006/04/11 00:08:24 bernie
+ *#* text_offset(): New function, but I'm not quite confident with the design.
+ *#*
*#* Revision 1.4 2006/03/07 22:18:04 bernie
*#* Correctly compute text width for prop fonts; Make styles a per-bitmap attribute.
*#*
struct Bitmap;
/* Low-level text functions (mware/text.c) */
+void text_offset(struct Bitmap *bm, coord_t x, coord_t y);
void text_moveto(struct Bitmap *bm, int row, int col);
void text_setcoord(struct Bitmap *bm, int x, int y);
int text_putchar(char c, struct Bitmap *bm);