summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOle Loots <ole@monochrom.net>2013-12-04 01:40:10 +0100
committerOle Loots <ole@monochrom.net>2013-12-04 01:40:10 +0100
commitc4ecef90d13bb446fec9624a819b99983c332c23 (patch)
treeabd80f12212c9ae5590e31b82ab8c899cbdb70c5
parent480f33e18afb7f89cf208d5055705f38a14d00ec (diff)
downloadnetsurf-c4ecef90d13bb446fec9624a819b99983c332c23.tar.gz
netsurf-c4ecef90d13bb446fec9624a819b99983c332c23.tar.bz2
Recognize scale when plotting bitmaps
-rwxr-xr-xatari/plot/plot.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/atari/plot/plot.c b/atari/plot/plot.c
index 3ebaaa281..eaadb8f77 100755
--- a/atari/plot/plot.c
+++ b/atari/plot/plot.c
@@ -1559,6 +1559,7 @@ int plot_init(char * fdrvrname)
atari_plot_bpp_virt = 8;
}
+ plot_set_scale(1.0);
update_visible_rect();
struct rect clip;
@@ -2059,6 +2060,12 @@ static bool plot_bitmap(int x, int y, int width, int height,
bmpw = bitmap_get_width(bitmap);
bmph = bitmap_get_height(bitmap);
+ if(view.scale != 1.0){
+ width = (int)(((float)width)*view.scale);
+ height = (int)(((float)height)*view.scale);
+ printf("bitmap scale: %d/%d (%f)\n", width, height, view.scale);
+ }
+
if ( repeat_x || repeat_y ) {
plot_get_clip(&clip);
if( repeat_x && width == 1 && repeat_y && height == 1 ) {