mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
CtrlCore: Win32 DrawTextOp MT fix
git-svn-id: svn://ultimatepp.org/upp/trunk@12672 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
b79697acb6
commit
277bd68665
2 changed files with 4 additions and 12 deletions
|
|
@ -6,27 +6,19 @@ namespace Upp {
|
|||
|
||||
#define LLOG(x)
|
||||
|
||||
HFONT GetWin32Font(Font fnt, int angle);
|
||||
HFONT GetWin32Font(Font fnt, int angle);
|
||||
extern StaticMutex sFontLock;
|
||||
|
||||
void SystemDraw::DrawTextOp(int x, int y, int angle, const wchar *text, Font font, Color ink,
|
||||
int n, const int *dx) {
|
||||
Std(font);
|
||||
/* while(n > 3000) {
|
||||
DrawTextOp(x, y, angle, text, font, ink, 3000, dx);
|
||||
if(dx)
|
||||
for(int i = 0; i < 30000; i++)
|
||||
x += *dx++;
|
||||
else
|
||||
x += GetTextSize(text, font, 3000).cx;
|
||||
n -= 3000;
|
||||
text += 3000;
|
||||
}*/
|
||||
GuiLock __;
|
||||
COLORREF cr = GetColor(ink);
|
||||
if(cr != lastTextColor) {
|
||||
LLOG("Setting text color: " << ink);
|
||||
::SetTextColor(handle, lastTextColor = cr);
|
||||
}
|
||||
Mutex::Lock ___(sFontLock);
|
||||
HGDIOBJ orgfont = ::SelectObject(handle, GetWin32Font(font, angle));
|
||||
int ascent = font.Info().GetAscent();
|
||||
if(angle) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue