Subversion Repositories Kolibri OS

Rev

Rev 8008 | Blame | Last modification | View Log | Download | RSS feed

  1. struct img
  2. {
  3.         collection src;
  4.         collection_int data;
  5.         collection_int xywh;
  6.         void drop();
  7. };
  8.  
  9. void img::drop()
  10. {
  11.         src.drop();
  12.         data.drop();
  13. }
  14.  
  15. /*
  16.  
  17. void ImageCache::Images(dword left1, top1, width1)
  18. {
  19.         dword image;
  20.     dword imgw=0, imgh=0, img_lines_first=0, cur_pic=0;
  21.        
  22.         //GetAbsoluteURL(#img_path);
  23.         //cur_pic = GetImage(#img_path);
  24.  
  25.         if (!pics[cur_pic].image)
  26.         {
  27.                 //cur_pic = GetImage("/sys/network/noimg.png");
  28.                 return;
  29.         }
  30.        
  31.         imgw = DSWORD[pics[cur_pic].image+4];
  32.         imgh = DSWORD[pics[cur_pic].image+8];
  33.         if (imgw > width1) imgw = width1;
  34.        
  35.         draw_y += imgh + 5; TEMPORARY TURN OFF!!!
  36.        
  37.         if (top1+imgh<WB1.list.y) || (top1>WB1.list.y+WB1.list.h-10) return; //if all image is out of visible area
  38.         if (top1<WB1.list.y) //if image partly visible (at the top)
  39.         {
  40.                 img_lines_first=WB1.list.y-top1;
  41.                 imgh=imgh-img_lines_first;
  42.                 top1=WB1.list.y;
  43.         }
  44.         if (top1>WB1.list.y+WB1.list.h-imgh-5) //if image partly visible (at the bottom)
  45.         {
  46.                 imgh=WB1.list.y+WB1.list.h-top1-5;
  47.         }      
  48.         if (imgh<=0) return;
  49.        
  50.         img_draw stdcall (pics[cur_pic].image, left1-5, top1, imgw, imgh,0,img_lines_first);
  51.         DrawBar(left1+imgw - 5, top1, WB1.list.w-imgw, imgh, page_bg);
  52.         DrawBar(WB1.list.x, top1+imgh, WB1.list.w, -imgh % WB1.list.item_h + WB1.list.item_h, page_bg);
  53.         if (link)
  54.         {
  55.                 UnsafeDefineButton(left1 - 5, top1, imgw, imgh-1, links.count + 400 + BT_HIDE, 0xB5BFC9);
  56.                 links.AddText(0, imgw, imgh-1, NOLINE, 1);
  57.                 WB1.DrawPage();
  58.         }
  59. }
  60.  
  61. ImageCache ImgCache;
  62.  
  63. */