mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-03 09:44:24 +03:00
Recognize scale when plotting bitmaps
This commit is contained in:
parent
480f33e18a
commit
c4ecef90d1
@ -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 ) {
|
||||
|
Loading…
Reference in New Issue
Block a user