mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
Draw: Fixed issue with very long texts in DrawText #572
git-svn-id: svn://ultimatepp.org/upp/trunk@6562 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
58f59ae605
commit
f0e1f55ee4
2 changed files with 7 additions and 7 deletions
|
|
@ -11,16 +11,16 @@ HFONT GetWin32Font(Font fnt, int angle);
|
|||
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 > 30000) {
|
||||
DrawTextOp(x, y, angle, text, font, ink, 30000, dx);
|
||||
/* 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, 30000).cx;
|
||||
n -= 30000;
|
||||
text += 30000;
|
||||
}
|
||||
x += GetTextSize(text, font, 3000).cx;
|
||||
n -= 3000;
|
||||
text += 3000;
|
||||
}*/
|
||||
GuiLock __;
|
||||
COLORREF cr = GetColor(ink);
|
||||
if(cr != lastTextColor) {
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ void Draw::DrawText(int x, int y, int angle, const wchar *text, Font font,
|
|||
else {
|
||||
int c = 1;
|
||||
int dd = 0;
|
||||
while(i + c < n) {
|
||||
while(i + c < n && c < 1000) {
|
||||
GlyphInfo gi2 = GetGlyphInfo(font, text[i + c]);
|
||||
if(!gi2.IsNormal())
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue