Code: Select all
import "ecere"
class Image : Window
{
text = "加载背景图片";
background = black;
borderStyle = fixed;
hasMinimize = true;
hasClose = true;
size = { 500, 400 };
isActiveClient = true;
BitmapResource boardBMP { ":back.jpg", window = this };
void OnRedraw(Surface surface)
{
surface.SetForeground(white);
surface.Blit(boardBMP.bitmap, 0,0, 0,0, boardBMP.bitmap.width, boardBMP.bitmap.height);
}
}
Image form1 {};