Subversion Repositories Kolibri OS

Rev

Rev 7285 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7285 Rev 7286
Line 1... Line 1...
1
struct _canvas
1
struct _canvas
2
{
2
{
3
	void write_text();
3
	void write_text();
4
	void draw_bar();
4
	void draw_hor_line();
5
};
5
};
Line 6... Line 6...
6
 
6
 
7
void _canvas::write_text(int _x, _y; dword _text_col, _text_off) 
7
void _canvas::write_text(int _x, _y; dword _text_col, _text_off) 
8
{
8
{
-
 
9
	char error_message[128];
9
	char error_message[128];
10
 
10
	if (_x > list.w) {
11
	if (_x > list.w) {
11
		sprintf(#error_message, "ERROR: canvas.x overflow: H %d X %d", kfont.size.height, _x);
12
		sprintf(#error_message, "ERROR: canvas.x overflow: H %d X %d", kfont.size.height, _x);
12
		debugln(#error_message);
13
		debugln(#error_message);
13
	}
14
	}
Line 20... Line 21...
20
	if (_y/list.item_h-list.first==list.visible) DrawPage();
21
	if (_y/list.item_h-list.first==list.visible) DrawPage();
21
}
22
}
22
 
23
 
Line 23... Line 24...
23
 
24
 
24
void _canvas::draw_bar(dword _x, _y, _w, _color)
25
void _canvas::draw_hor_line(dword _x, _y, _w, _color)
25
{
26
{
26
	int i;
27
	int i;
27
	for (i = _y*list.w+_x*KFONT_BPP+kfont.raw ; i<_y*list.w+_x+_w*KFONT_BPP+kfont.raw ; i+=KFONT_BPP) 
28
	for (i = _y*list.w+_x*KFONT_BPP+kfont.raw ; i<_y*list.w+_x+_w*KFONT_BPP+kfont.raw ; i+=KFONT_BPP) 
28
	{
29
	{