Layer pop-up preview now has higher resolution (bypasses pixel ratio and menu zoom)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1935 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
99ce514ce8
commit
c6479d22f6
15
src/engine.c
15
src/engine.c
@ -1430,7 +1430,7 @@ void Main_handler(void)
|
|||||||
if (!preview_is_visible)
|
if (!preview_is_visible)
|
||||||
{
|
{
|
||||||
previewW = Layer_button_width;
|
previewW = Layer_button_width;
|
||||||
previewH = previewW * Main_image_height / Main_image_width;
|
previewH = previewW * Main_image_height / Main_image_width * Menu_factor_X / Menu_factor_Y;
|
||||||
if (previewH * Menu_factor_Y > Menu_Y) previewH = Menu_Y / Menu_factor_Y;
|
if (previewH * Menu_factor_Y > Menu_Y) previewH = Menu_Y / Menu_factor_Y;
|
||||||
|
|
||||||
Open_popup((Buttons_Pool[BUTTON_LAYER_SELECT].X_offset + 2)*Menu_factor_X,
|
Open_popup((Buttons_Pool[BUTTON_LAYER_SELECT].X_offset + 2)*Menu_factor_X,
|
||||||
@ -1454,12 +1454,15 @@ void Main_handler(void)
|
|||||||
if (layer*Layer_button_width+previewW > Window_width)
|
if (layer*Layer_button_width+previewW > Window_width)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
for (x = 0; x < previewW; x++)
|
for (y = 0; y < previewH*Pixel_height*Menu_factor_Y; y++)
|
||||||
for (y = 0; y < previewH; y++)
|
for (x = 0; x < previewW*Pixel_width*Menu_factor_X; x++)
|
||||||
{
|
{
|
||||||
int imgx = x * Main_image_width / previewW;
|
int imgx = x * Main_image_width / previewW/Pixel_width/Menu_factor_X;
|
||||||
int imgy = y * Main_image_height / previewH;
|
int imgy = y * Main_image_height / previewH/Pixel_height/Menu_factor_Y;
|
||||||
Pixel_in_window(layer*Layer_button_width + x, y, *(Main_backups->Pages->Image[layer].Pixels
|
// Use Pixel_simple() instead of Pixel_in_window() in order to get higher resolution
|
||||||
|
//Pixel_in_window(layer*Layer_button_width + x, y, *(Main_backups->Pages->Image[layer].Pixels
|
||||||
|
// + imgx + imgy * Main_image_width));
|
||||||
|
Pixel_simple(x+(layer*Layer_button_width*Menu_factor_X+Window_pos_X)*Pixel_width, y+Window_pos_Y*Pixel_height, *(Main_backups->Pages->Image[layer].Pixels
|
||||||
+ imgx + imgy * Main_image_width));
|
+ imgx + imgy * Main_image_width));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user