From c4ecef90d13bb446fec9624a819b99983c332c23 Mon Sep 17 00:00:00 2001 From: Ole Loots Date: Wed, 4 Dec 2013 01:40:10 +0100 Subject: Recognize scale when plotting bitmaps --- atari/plot/plot.c | 7 +++++++ 1 file changed, 7 insertions(+) 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 ) { -- cgit v1.2.3