New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
has setting about crop background #1180
Comments
I am missing an explanation what this piece of code is meant to suggest or achieve... |
it crop the picture to avoid deformation when window size changes, instead of scale image to fit window |
I could try, but... could you clarify which of the background image modes is supposed to be affected? |
background " _" is changed, it just change "scaled" to "crop".now ,i set background with " _", then window ratio is different from img ratio ,so, the img is scaled to window ratio. The code scale img with img's original ratio.It looks better when change window size |
Please quote your command. Note there is a variation of behaviour already available, maybe prefix |
it will not has empty area,it will sacle until fill all area. |
I don't like guesswork investigation so much. You have still not answered my question how you invoke mintty to demonstrate the difference (i.e. which mode of Background=... you use). Also there are two similar locations in the source file where your patch would fit. |
Prefix syntax could be |
The code used in function "static void load_background_image_brush(HDC dc, wstring fn)",in 1813 line It is right scale first, keeping aspect ratio, then tile |
If image is bigger then mintty size or more small ,the code can automatically scale img to suitable size. |
or bottom scale first, depending on the dimensions. |
I introduced this now with background image prefix |
Released 3.6.2. |
mintty auto crop image to fit background
in wintext.c static void load_background_image_brush(HDC dc, wstring fn)
change:
HDC dc0 = CreateCompatibleDC(dc);
HBITMAP oldhbm0 = SelectObject(dc0, hbm);
The text was updated successfully, but these errors were encountered: