summaryrefslogtreecommitdiff
path: root/atari/plot/plotter.c
diff options
context:
space:
mode:
authorOle Loots <ole@monochrom.net>2012-03-12 21:24:38 +0000
committerOle Loots <ole@monochrom.net>2012-03-12 21:24:38 +0000
commit2e65e51fc5ad3042201988d49ba061a781b70351 (patch)
treeb2dceed93492e87e11a708fe3e3e34aadc47b0d1 /atari/plot/plotter.c
parent4604f293b768aa806f951e260518c62b3f4367c1 (diff)
downloadnetsurf-2e65e51fc5ad3042201988d49ba061a781b70351.tar.gz
netsurf-2e65e51fc5ad3042201988d49ba061a781b70351.tar.bz2
Added GD Plotter stub.
svn path=/trunk/netsurf/; revision=13512
Diffstat (limited to 'atari/plot/plotter.c')
-rwxr-xr-xatari/plot/plotter.c64
1 files changed, 41 insertions, 23 deletions
diff --git a/atari/plot/plotter.c b/atari/plot/plotter.c
index 06632d3ee..7a4ff81ea 100755
--- a/atari/plot/plotter.c
+++ b/atari/plot/plotter.c
@@ -31,7 +31,11 @@
#include "image/bitmap.h"
#include "atari/plot/eddi.h"
#include "atari/plot/plotter.h"
-#include "atari/plot/plotter_vdi.h"
+#include "atari/plot/plotter_vdi.h"
+#ifdef WITH_GD_PLOTTER
+ #include "atari/plot/plotter_gd.h"
+#endif
+
#ifdef WITH_VDI_FONT_DRIVER
#include "atari/plot/font_vdi.h"
#endif
@@ -46,6 +50,40 @@
#include "atari/misc.h"
#include "atari/osspec.h"
+
+struct s_driver_table_entry screen_driver_table[] =
+{
+ {
+ (char*)"vdi",
+ ctor_plotter_vdi,
+ PLOT_FLAG_HAS_ALPHA,
+ 32
+ },
+#ifdef WITH_GD_PLOTTER
+ {
+ (char*)"gd",
+ ctor_plotter_gd,
+ PLOT_FLAG_OFFSCREEN | PLOT_FLAG_HAS_ALPHA,
+ 32
+ },
+#endif
+ {(char*)NULL, NULL, 0, 0 }
+};
+
+const struct s_font_driver_table_entry font_driver_table[] =
+{
+#ifdef WITH_VDI_FONT_DRIVER
+ {(char*)"vdi", ctor_font_plotter_vdi, 0},
+#endif
+#ifdef WITH_FREETYPE_FONT_DRIVER
+ {(char*)"freetype", ctor_font_plotter_freetype, 0},
+#endif
+#ifdef WITH_INTERNAL_FONT_DRIVER
+ {(char*)"internal", ctor_font_plotter_internal, 0},
+#endif
+ {(char*)NULL, NULL, 0}
+};
+
/* get index to driver in driver list by name */
static int drvrname_idx( char * name );
@@ -103,26 +141,6 @@ unsigned short vdi_web_pal[216][3] = {
static short prev_vdi_clip[4];
struct s_vdi_sysinfo vdi_sysinfo;
-struct s_driver_table_entry screen_driver_table[] =
-{
- {(char*)"vdi", ctor_plotter_vdi, 0, 32},
- {(char*)NULL, NULL, 0, 0 }
-};
-
-const struct s_font_driver_table_entry font_driver_table[] =
-{
-#ifdef WITH_VDI_FONT_DRIVER
- {(char*)"vdi", ctor_font_plotter_vdi, 0},
-#endif
-#ifdef WITH_FREETYPE_FONT_DRIVER
- {(char*)"freetype", ctor_font_plotter_freetype, 0},
-#endif
-#ifdef WITH_INTERNAL_FONT_DRIVER
- {(char*)"internal", ctor_font_plotter_internal, 0},
-#endif
- {(char*)NULL, NULL, 0}
-};
-
struct s_vdi_sysinfo * read_vdi_sysinfo( short vdih, struct s_vdi_sysinfo * info ) {
unsigned long cookie_EdDI=0;
@@ -380,7 +398,7 @@ GEM_PLOTTER new_plotter(int vdihandle, char * name, GRECT * loc_size,
gemplotter->name = name;
gemplotter->vdi_handle = vdihandle;
- gemplotter->flags |= flags;
+ gemplotter->flags = 0;
gemplotter->font_plotter = fplotter;
gemplotter->bpp_virt = virt_bpp;
gemplotter->cfbi = 0;
@@ -404,7 +422,7 @@ GEM_PLOTTER new_plotter(int vdihandle, char * name, GRECT * loc_size,
else {
if( strcmp(name, screen_driver_table[i].name) == 0 ) {
if( screen_driver_table[i].ctor ) {
- gemplotter->flags |= screen_driver_table[i].flags;
+ gemplotter->flags = (screen_driver_table[i].flags | flags);
res = screen_driver_table[i].ctor( gemplotter );
*error = 0;
} else {