mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
Syncing uppdev
git-svn-id: svn://ultimatepp.org/upp/trunk@1481 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
bb5c630b41
commit
e2c904ad22
2 changed files with 50 additions and 43 deletions
|
|
@ -1,13 +1,17 @@
|
|||
#include <Core/Core.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
CONSOLE_APP_MAIN
|
||||
{
|
||||
FindFile ff("u:\\upp.src\\uppdev\\aggdraw\\*.*");
|
||||
while(ff) {
|
||||
DUMP(ff.GetName());
|
||||
ff.Next();
|
||||
}
|
||||
}
|
||||
|
||||
#include <Core/Core.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
CONSOLE_APP_MAIN
|
||||
{
|
||||
FindFile ff("/bin/*.*");
|
||||
while(ff) {
|
||||
DUMP(ff.GetName());
|
||||
DUMP(ff.IsSymLink());
|
||||
DUMP(ff.IsFolder());
|
||||
DUMP(ff.GetLength());
|
||||
LOG("----------------------");
|
||||
ff.Next();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,30 +1,33 @@
|
|||
#include <CtrlLib/CtrlLib.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
struct MyApp : TopWindow {
|
||||
virtual void Paint(Draw& w)
|
||||
{
|
||||
w.DrawRect(GetSize(), White());
|
||||
Font fnt = Arial(16);
|
||||
int fcx = fnt['X'];
|
||||
{
|
||||
RTIMING("Optimized");
|
||||
for(int q = 0; q < 100000; q++)
|
||||
w.DrawText(0, 0, String('X', 30), fnt);
|
||||
}
|
||||
{
|
||||
RTIMING("One char");
|
||||
for(int q = 0; q < 100000; q++)
|
||||
for(int i = 0; i < 30; i++)
|
||||
w.DrawText(i * fcx, 40, String('X', 1), fnt);
|
||||
}
|
||||
w.DrawText(100, 100, "Finished");
|
||||
}
|
||||
};
|
||||
|
||||
GUI_APP_MAIN
|
||||
{
|
||||
MyApp().Run();
|
||||
}
|
||||
|
||||
#include <CtrlLib/CtrlLib.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
struct MyApp : TopWindow {
|
||||
virtual void Paint(Draw& w)
|
||||
{
|
||||
w.DrawRect(GetSize(), White());
|
||||
Font fnt = Arial(16);
|
||||
int fcx = fnt['X'];
|
||||
String txt;
|
||||
for(int i = 0; i < 30; i++)
|
||||
txt.Cat(i + 'A');
|
||||
{
|
||||
RTIMING("Optimized");
|
||||
for(int q = 0; q < 10000; q++)
|
||||
w.DrawText(0, 0, txt, fnt);
|
||||
}
|
||||
{
|
||||
RTIMING("One char");
|
||||
for(int q = 0; q < 10000; q++)
|
||||
for(int i = 0; i < 30; i++)
|
||||
w.DrawText(i * fcx, 40, String('A' + i, 1), fnt);
|
||||
}
|
||||
w.DrawText(100, 100, "Finished");
|
||||
}
|
||||
};
|
||||
|
||||
GUI_APP_MAIN
|
||||
{
|
||||
MyApp().Run();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue