summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOle Loots <ole@monochrom.net>2012-12-07 22:09:59 +0100
committerOle Loots <ole@monochrom.net>2012-12-07 22:09:59 +0100
commitec0c68503df1492bf35aad3a9f7ea55f3eee0721 (patch)
treec7c62f312909f83f06b58ac05853538d123180e2
parent0a237c6e4793198829f2e9058d54b3eeb7bb0133 (diff)
downloadnetsurf-ec0c68503df1492bf35aad3a9f7ea55f3eee0721.tar.gz
netsurf-ec0c68503df1492bf35aad3a9f7ea55f3eee0721.tar.bz2
Added function to retrieve current plotter dimensions.
-rwxr-xr-xatari/plot/plot.c12
-rwxr-xr-xatari/plot/plot.h1
2 files changed, 12 insertions, 1 deletions
diff --git a/atari/plot/plot.c b/atari/plot/plot.c
index e0d52a422..81c97c18b 100755
--- a/atari/plot/plot.c
+++ b/atari/plot/plot.c
@@ -154,7 +154,7 @@ static HermesFormat vfmt;
/* netsurf source bitmap format */
static HermesFormat nsfmt;
-static struct s_vdi_sysinfo vdi_sysinfo;
+struct s_vdi_sysinfo vdi_sysinfo;
/* bit depth of framebuffers: */
static int atari_plot_bpp_virt;
static struct s_view view;
@@ -1900,6 +1900,16 @@ bool plot_set_dimensions(int x, int y, int w, int h)
return(true);
}
+bool plot_get_dimensions(GRECT *dst)
+{
+
+ dst->g_x = view.x;
+ dst->g_y = view.y;
+ dst->g_w = view.w;
+ dst->g_h = view.h;
+ return(true);
+}
+
bool plot_clip(const struct rect *clip)
{
// FIXME: consider the canvas size
diff --git a/atari/plot/plot.h b/atari/plot/plot.h
index 53a2645f8..0c1db0f7a 100755
--- a/atari/plot/plot.h
+++ b/atari/plot/plot.h
@@ -107,6 +107,7 @@ const char* plot_err_str(int i) ;
bool plot_lock(void);
bool plot_unlock(void);
bool plot_set_dimensions( int x, int y, int w, int h );
+bool plot_get_dimensions(GRECT *dst);
bool plot_get_clip(struct rect * out);
/* Get clipping for current framebuffer as GRECT */
void plot_get_clip_grect(GRECT * out);