加载背景图片loadBackgroudImage

来自中国的朋友,欢迎您在本版面使用中文讨论问题。请注意,如果您想得到不懂中文的人的帮助,请同时提供英文译文。
Help and discussions in Chinese.
Post Reply
liqi98136
Posts: 53
Joined: Sun Jan 17, 2010 11:37 pm

加载背景图片loadBackgroudImage

Post by liqi98136 »

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 {};
Post Reply