Subversion Repositories Kolibri OS

Rev

Rev 7995 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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