Home » Community » Newbie corner » How to lighten the process when draw a large amount image?
How to lighten the process when draw a large amount image? [message #47485] |
Sat, 21 January 2017 15:53 |
kurete
Messages: 17 Registered: March 2016 Location: Japan
|
Promising Member |

|
|
I make Tile Map Editor used Ultimate++ like RPG Maker.
However, this process is very sluggish.
What should I do?
Sample Code
#include <CtrlLib/CtrlLib.h>
using namespace Upp;
class TileMapTest : public TopWindow {
public:
typedef TileMapTest CLASSNAME;
TileMapTest()
{
this->SetRect(0,0,640,480);
}
void Paint(Draw& w)
{
int a=w.GetPaintRect().GetWidth();
for(int z=0;z<5;z++)
{
for(int i=0;i<120;i++)
{
for(int m=0;m<120;m++)
{
if(static_cast<int>(100*Randomf())%2==0)
{
w.DrawImage(i*16,m*16,16,16,CtrlImg::File());
}
}
}
}
}
void LeftDown(Point p,dword keyflags)
{
Refresh();
}
};
GUI_APP_MAIN
{
TileMapTest().Run();
}
|
|
|
Goto Forum:
Current Time: Fri May 02 07:24:33 CEST 2025
Total time taken to generate the page: 0.00784 seconds
|