Rev 6372 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6372 | Rev 6375 | ||
---|---|---|---|
Line 12... | Line 12... | ||
12 | DrawProgress(STEP_3_DRAW_PAGE_INTO_BUFFER); ParceTxt(true); //draw text in buffer |
12 | DrawProgress(STEP_3_DRAW_PAGE_INTO_BUFFER); ParceTxt(true); //draw text in buffer |
13 | } else { |
13 | } else { |
14 | debugln(" tag found"); |
14 | debugln(" tag found"); |
15 | DrawProgress(STEP_2_COUNT_PAGE_HEIGHT); ParceHtml(false); //get page height to calculate buffer size |
15 | DrawProgress(STEP_2_COUNT_PAGE_HEIGHT); ParceHtml(false); //get page height to calculate buffer size |
16 | DrawProgress(STEP_3_DRAW_PAGE_INTO_BUFFER); ParceHtml(true); //draw text in buffer |
16 | // debugln("DONE STEP 2"); |
- | 17 | DrawProgress(STEP_3_DRAW_PAGE_INTO_BUFFER); ParceHtml(true); //draw text in buffer |
|
17 | } |
18 | // debugln("DONE STEP 3"); |
- | 19 | } |
|
18 | strcat(#title, " - Aelia"); |
20 | strcat(#title, " - Aelia"); |
19 | DrawTitle(#title); |
21 | DrawTitle(#title); |
20 | DrawProgress(STEP_4_SMOOTH_FONT); label.apply_smooth(); |
22 | DrawProgress(STEP_4_SMOOTH_FONT); label.apply_smooth(); |
21 | DrawProgress(STEP_5_STOP); DrawPage(); |
23 | DrawProgress(STEP_5_STOP); DrawPage(); |
22 | } |
24 | } |
Line 72... | Line 74... | ||
72 | 74 | ||
Line 73... | Line 75... | ||
73 | 75 | ||
74 | void ParceHtml(byte draw) |
76 | void ParceHtml(byte draw) |
75 | { |
77 | { |
76 | dword DOM_start, DOM_end, DOM_len, DOM_pos; |
78 | dword DOM_start, DOM_end, DOM_len, DOM_pos, aux2; |
77 | int stroka_x = HTML_PADDING_X; |
79 | int stroka_x = HTML_PADDING_X; |
78 | int stroka_y = HTML_PADDING_Y; |
80 | int stroka_y = HTML_PADDING_Y; |
79 | int size_pt_change = 0; |
81 | int size_pt_change = 0; |
80 | dword line_break; |
82 | dword line_break; |
81 | byte ch, zeroch; |
83 | byte ch, zeroch; |
82 | _text text; |
84 | _text text; |
83 | _tag tag; |
- | |
- | 85 | _tag tag; |
|
84 | 86 | debugln("-------START PARCING-------"); |
|
85 | tag.clear(); |
87 | tag.clear(); |
86 | style.clear(); |
88 | style.clear(); |
87 | /* Create DOM */ |
89 | /* Create DOM */ |
88 | debugln("creating DOM"); |
90 | debugln("creating DOM"); |
Line 106... | Line 108... | ||
106 | strcpy(#title, text.start); |
108 | strcpy(#title, text.start); |
107 | continue; |
109 | continue; |
108 | } |
110 | } |
109 | strtrim(text.start); |
111 | strtrim(text.start); |
110 | while (get_label_len(text.start) + stroka_x + 30 > list.w) |
112 | // try to change the special symbols that may appear |
- | 113 | text.fixSpecial(); |
|
- | 114 | ||
- | 115 | while (get_label_len(text.start) + stroka_x + 30 > list.w) |
|
111 | { |
116 | { |
112 | zeroch = 0; |
117 | zeroch = 0; |
113 | for (line_break=tag.start-1; line_break>text.start; line_break--;) |
118 | for (line_break=tag.start-1; line_break>text.start; line_break--;) |
114 | { |
119 | { |
115 | ESBYTE[line_break] >< zeroch; //set line end |
120 | ESBYTE[line_break] >< zeroch; //set line end |
Line 190... | Line 195... | ||
190 | label.size.height = list.count+5*list.item_h; |
195 | label.size.height = list.count+5*list.item_h; |
191 | label.raw_size = 0; |
196 | label.raw_size = 0; |
192 | } |
197 | } |
193 | free(DOM_start); |
198 | free(DOM_start); |
194 | }>>>=>>')>>>> |