Ecere SDK/eC Forums
http://www.ecere.com/forums/
Print view

加载背景图片loadBackgroudImage
http://www.ecere.com/forums/viewtopic.php?f=30&t=40
Page 1 of 1
Author:  liqi98136 [ Wed Mar 10, 2010 8:53 am ]
Post subject:  加载背景图片loadBackgroudImage

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 {};
All times are UTC-05:00 Page 1 of 1