diff options
-rwxr-xr-x | atari/plot/plotter.c | 8 | ||||
-rwxr-xr-x | atari/plot/plotter.h | 12 |
2 files changed, 15 insertions, 5 deletions
diff --git a/atari/plot/plotter.c b/atari/plot/plotter.c index 8359215c1..06632d3ee 100755 --- a/atari/plot/plotter.c +++ b/atari/plot/plotter.c @@ -325,10 +325,12 @@ FONT_PLOTTER new_font_plotter( int vdihandle, char * name, unsigned long flags, if( fplotter == NULL ) {
*error = 0-ERR_NO_MEM;
return( NULL );
- }
+ } + memset( fplotter, 0, sizeof(FONT_PLOTTER));
fplotter->vdi_handle = vdihandle;
- fplotter->name = name;
- fplotter->flags |= flags;
+ fplotter->name = name; + fplotter->flags = 0;
+ fplotter->flags |= flags; for( i = 0; ; i++) {
if( font_driver_table[i].name == NULL ) {
res = 0-ERR_PLOTTER_NOT_AVAILABLE;
diff --git a/atari/plot/plotter.h b/atari/plot/plotter.h index 513eadfa1..d2d44c0d8 100755 --- a/atari/plot/plotter.h +++ b/atari/plot/plotter.h @@ -55,7 +55,10 @@ #define PLOT_FLAG_OFFSCREEN 0x01 /* offsreen plotter should set/accept this flag */
#define PLOT_FLAG_LOCKED 0x02 /* plotter should set this flag during screen updates */
#define PLOT_FLAG_DITHER 0x04 /* true if the plotter shall dither images */
-#define PLOT_FLAG_TRANS 0x08 /* true if the plotter supports transparent operations */
+#define PLOT_FLAG_TRANS 0x08 /* true if the plotter supports transparent operations */ + +/* Font Plotter flags: */ +#define FONTPLOT_FLAG_MONOGLYPH 0x01 /* Flags for init_mfdb function: */
#define MFDB_FLAG_STAND 0x01
@@ -84,7 +87,11 @@ typedef int (*_fpmf_pixel_pos)( FONT_PLOTTER self, const plot_font_style_t *fsty int x, size_t *char_offset, int *actual_x);
typedef int (*_fpmf_text)( FONT_PLOTTER self, int x, int y, const char *text,
size_t length, const plot_font_style_t *fstyle);
+ +typedef void (*_fpmf_draw_glyph)(FONT_PLOTTER self, GRECT * loc, uint8_t * pixdata, + int pitch, uint32_t colour); typedef int (*_fpmf_dtor)( FONT_PLOTTER self );
+ /* prototype of the font plotter "object" */
struct s_font_plotter
@@ -98,7 +105,8 @@ struct s_font_plotter _fpmf_str_width str_width;
_fpmf_str_split str_split;
_fpmf_pixel_pos pixel_pos;
- _fpmf_text text;
+ _fpmf_text text; + _fpmf_draw_glyph draw_glyph;
_fpmf_dtor dtor;
};
|