mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-31 07:12:39 -06:00
upp.src: HiDPI fixes
git-svn-id: svn://ultimatepp.org/upp/trunk@8790 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
6998e11c21
commit
4147ebe8ec
11 changed files with 56 additions and 122 deletions
|
|
@ -31,17 +31,6 @@ WString TextUnicode(const char *s, int n, byte cs, Font font)
|
|||
void Draw::DrawText(int x, int y, int angle, const wchar *text, Font font,
|
||||
Color ink, int n, const int *dx)
|
||||
{
|
||||
Buffer<int> dx2;
|
||||
if(hmul != 1) {
|
||||
x = Hmul(x);
|
||||
y = Hmul(y);
|
||||
font.Height(Hmul(font.GetHeight()));
|
||||
if(dx) {
|
||||
dx2.Alloc(n);
|
||||
for(int i = 0; i < n; i++)
|
||||
dx2[i] = Hmul(dx[i]);
|
||||
}
|
||||
}
|
||||
#if defined(flagWINGL) || defined(flagLINUXGL)
|
||||
if(IsNull(ink))
|
||||
return;
|
||||
|
|
@ -124,7 +113,7 @@ void Draw::DrawText(int x, int y, int angle, const wchar *text, Font font,
|
|||
posx += dx ? *dx++ : gi.width;
|
||||
}
|
||||
|
||||
if((GetInfo() & DRAWTEXTLINES) && (font0.IsUnderline() || font0.IsStrikeout())) {
|
||||
if((GetInfo() & DRAWTEXTLINES) && (font0.IsUnderline() || font0.IsStrikeout())) {
|
||||
int hg = abs(font0.GetCy());
|
||||
if(hg == 0) hg = 10;
|
||||
int thickness = max(hg / 20, 1);
|
||||
|
|
@ -233,7 +222,7 @@ void Draw::DrawText(int x, int y, const String& text, Font font, Color ink, cons
|
|||
Size GetTextSize(const wchar *text, Font font, int n)
|
||||
{
|
||||
#if defined(flagWINGL) || defined(flagLINUXGL)
|
||||
return GetTextSize(text, resources.GetFont(font), n);
|
||||
return GetTextSize(text, resources.GetFont(font), n);
|
||||
#else
|
||||
FontInfo fi = font.Info();
|
||||
if(n < 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue