Rev 8320 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 8320 | Rev 8330 | ||
---|---|---|---|
Line 32... | Line 32... | ||
32 | xywh.add(_x); |
32 | xywh.add(_x); |
33 | xywh.add(_y); |
33 | xywh.add(_y); |
34 | xywh.add(NULL); |
34 | xywh.add(NULL); |
35 | xywh.add(NULL); |
35 | xywh.add(NULL); |
36 | return full_path; |
36 | return #full_path; |
37 | } |
37 | } |
38 | 38 | ||
Line 39... | Line 39... | ||
39 | bool _img::set_size(dword _buf, _size) |
39 | bool _img::set_size(dword _id, _buf, _size) |
40 | { |
40 | { |
41 | char vvv[1000]; |
- | |
42 | int w, h; |
- | |
43 | img_decode stdcall (_buf, _size, 0); |
41 | img_decode stdcall (_buf, _size, 0); |
44 | if (EAX) { |
42 | if (EAX) { |
45 | EDI = EAX; |
43 | EDI = EAX; |
46 | w = ESDWORD[EDI+4]; |
- | |
47 | h = ESDWORD[EDI+8]; |
- | |
48 | xywh.set(getid*4+2, ESDWORD[EDI+4]); |
44 | xywh.set(_id*4+2, ESDWORD[EDI+4]); |
49 | xywh.set(getid*4+3, ESDWORD[EDI+8]); |
45 | xywh.set(_id*4+3, ESDWORD[EDI+8]); |
50 | sprintf(#vvv, "%s w:%i h:%i", current_url(), w, h); |
46 | free(EDI); |
51 | debugln(#vvv); |
47 | return true; |
52 | } |
48 | } |
- | 49 | return false; |
|
53 | } |
50 | } |
Line -... | Line 51... | ||
- | 51 | ||
54 | 52 | //DELTE!!!!!11111111111111111111111111111111111111 |
|
55 | dword _img::current_url() |
53 | dword _img::current_url() |
56 | { |
54 | { |
57 | return url.get(getid); |
55 | return url.get(getid); |
Line -... | Line 56... | ||
- | 56 | } |
|
58 | } |
57 | |
59 | 58 | //DELTE!!!!!11111111111111111111111111111111111111 |
|
60 | bool _img::next_url() |
59 | bool _img::next_url() |
61 | { |
60 | { |
62 | if (getid < url.count-1) { |
61 | if (getid < url.count-1) { |
63 | getid++; |
62 | getid++; |
64 | return 1; |
63 | return 1; |
65 | } |
64 | } |
Line 66... | Line 65... | ||
66 | return 0; |
65 | return 0; |
67 | } |
66 | } |
68 | 67 | ||
Line 69... | Line 68... | ||
69 | void _img::draw_all(int _x, _y, _start, _height) |
68 | void _img::draw_all(int _x, _y, _w, _h, _start) |
70 | { |
69 | { |
71 | int i, img_y; |
70 | int i, img_y; |
Line 72... | Line 71... | ||
72 | 71 | ||
73 | for (i=0; i |
72 | for (i=0; i |
74 | { |
73 | { |
75 | img_y = xywh.get(i*4 + 1); |
74 | img_y = xywh.get(i*4 + 1); |
Line 76... | Line 75... | ||
76 | 75 | ||
77 | if (img_y > _start) && (img_y < _start + _height) |
76 | if (img_y > _start) && (img_y < _start + _h) |
78 | && (cache.has(url.get(i))) draw(_x, _y, _start, i); |
77 | && (cache.has(url.get(i))) draw(_x, _y, _w, _h, _start, i); |
79 | } |
78 | } |
80 | } |
79 | } |
81 | 80 | ||
82 | bool _img::draw(int _x, _y, _start, i) |
- | |
83 | { |
- | |
84 | libimg_image im; |
- | |
85 | img_decode stdcall (cache.current_buf, cache.current_size, 0); |
- | |
86 | if (EAX) { |
- | |
87 | im.image = EAX; |
- | |
88 | im.draw(xywh.get(i*4) + _x, xywh.get(i*4+1) - _start + _y, im.w, im.h, 0, 0); |
- | |
89 | } |
- | |
90 | } |
- | |
91 | - | ||
92 | /* |
- | |
93 | - | ||
94 | void ImageCache::Images(dword left1, top1, width1) |
- | |
95 | { |
- | |
96 | dword image; |
- | |
97 | dword imgw=0, imgh=0, img_lines_first=0, cur_pic=0; |
- | |
98 | - | ||
99 | //getting abs url from (#img_path); |
- | |
100 | //cur_pic = GetImage(#img_path); |
- | |
101 | - | ||
102 | if (!pics[cur_pic].image) |
- | |
103 | { |
- | |
104 | //cur_pic = GetImage("/sys/network/noimg.png"); |
- | |
Line -... | Line 81... | ||
- | 81 | bool _img::draw(int _x, _y, _w, _h, _start, i) |
|
105 | return; |
82 | { |
- | 83 | int img_x, img_y, img_w, img_h; |
|
- | 84 | img_decode stdcall (cache.current_buf, cache.current_size, 0); |
|
Line 106... | Line -... | ||
106 | } |
- | |
107 | - | ||
108 | imgw = DSWORD[pics[cur_pic].image+4]; |
- | |
109 | imgh = DSWORD[pics[cur_pic].image+8]; |
- | |
110 | if (imgw > width1) imgw = width1; |
- | |
111 | - | ||
112 | draw_y += imgh + 5; TEMPORARY TURN OFF!!! |
- | |
113 | - | ||
114 | if (top1+imgh |
- | |
115 | if (top1 |
- | |
116 | { |
- | |
117 | img_lines_first=WB1.list.y-top1; |
- | |
Line 118... | Line 85... | ||
118 | imgh=imgh-img_lines_first; |
85 | if (EAX) { |
119 | top1=WB1.list.y; |
- | |
120 | } |
- | |
121 | if (top1>WB1.list.y+WB1.list.h-imgh-5) //if image partly visible (at the bottom) |
86 | EDI = EAX; |
122 | { |
- | |
123 | imgh=WB1.list.y+WB1.list.h-top1-5; |
- | |
124 | } |
- | |
125 | if (imgh<=0) return; |
- | |
126 | 87 | ||
127 | img_draw stdcall (pics[cur_pic].image, left1-5, top1, imgw, imgh,0,img_lines_first); |
88 | img_x = xywh.get(i*4+0); |
128 | DrawBar(left1+imgw - 5, top1, WB1.list.w-imgw, imgh, page_bg); |
- | |
129 | DrawBar(WB1.list.x, top1+imgh, WB1.list.w, -imgh % WB1.list.item_h + WB1.list.item_h, page_bg); |
- | |
130 | if (link) |
- | |
131 | { |
- | |
132 | UnsafeDefineButton(left1 - 5, top1, imgw, imgh-1, links.count + 400 + BT_HIDE, 0xB5BFC9); |
- |