ultimatepp/uppdev/DrawText697/main.cpp
cxl fcfe4a5a37 Syncing uppdev
git-svn-id: svn://ultimatepp.org/upp/trunk@1809 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2009-12-13 22:16:41 +00:00

26 lines
621 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#include <CtrlLib/CtrlLib.h>
using namespace Upp;
struct Test : TopWindow {
virtual void Paint(Draw& w) {
WString s;
s << "Napishite zdesʹ tekst dlya perevoda";
Buffer<int> wd(s.GetLength());
for(int i = 0; i < s.GetCount(); i++)
wd[i] = StdFont()[s[i]];
w.DrawRect(GetSize(), White);
w.DrawText(100, 100, ~s, StdFont(), Black, s.GetLength(), wd);
w.DrawText(50, 200, ~s, StdFont(), Black, s.GetLength(), wd);
}
};
GUI_APP_MAIN
{
DDUMP("Here");
DocEdit e;
e.Set(WString("Napishite zdesʹ tekst dlya perevoda"));
Test t;
t.Add(e.TopPos(0, 50).HSizePos());
t.Run();
}