// ---------------------------------------------------------------------------
// 
// ------------
bool bvDefRangeRectStyle::load(bGenericXMLBaseElement* root){
bGenericXMLBaseElement		*chld,*elt;
char						val[_values_length_max_];
	
	if(!std_load(root)){
		return(false);
	}
	
	if(chld=_gapp->classMgr()->NthElement(_gstl,1,"stroke")){
		if(!prop_load(chld)){
			color_load(chld,_stroke);
		}
	}
	
	if(chld=_gapp->classMgr()->NthElement(_gstl,1,"fill")){
		if(!prop_load(chld)){
			color_load(chld,_fcolor);
		}
	}
	else if(chld=_gapp->classMgr()->NthElement(_gstl,1,"fillpattern")){
		chld->getvalue(_pat);
	}
	
	if(elt=_gapp->classMgr()->NthElement(_gstl,1,"hsize")){
		elt->getvalue(val);
		_h=matof(val);
	}
	if(elt=_gapp->classMgr()->NthElement(_gstl,1,"vsize")){
		elt->getvalue(val);
		_v=matof(val);
	}
	if(elt=_gapp->classMgr()->NthElement(_gstl,1,"width")){
		elt->getvalue(val);
		_width=matof(val);
	}
	if(elt=_gapp->classMgr()->NthElement(_gstl,1,"roundedradius")){
		elt->getvalue(val);
		_rradius=matof(val);
	}
	if(elt=_gapp->classMgr()->NthElement(_gstl,1,"centroid")){
		elt->getvalue(val);
		_centro=atoi(val);
	}
	else{
		_centro=false;
	}
	return(true);
}
示例#2
0
// progressbar. Uses cur_save!  / PopUp
void prg_bar (int pro, unsigned char size, char fgc, char bgc)
{
	
	cur_save();
	color_save();
	int i, perc;
	
	/*if (perc > 0)
		pro = (perc*100)/size;
	else
		pro = 0;*/
		
	perc = size * pro / 100;
	
	
	set_color(fgc, bgc);
	for (i = 0; i < perc; i++)
		kprint(" ");
		
	set_color(bgc, fgc);
	for (; i < size; i++)
		kprint(" ");
	
	
	set_color(fgc, bgc);
	cur_load();
	
	cur_x += (size / 2) - 2;
	
	if ((size / 2) - 2 >= perc) set_color(bgc, fgc);
	kprint(itoa(pro / 100 % 10));
	
	if ((size / 2) - 1 >= perc) set_color(bgc, fgc);
	kprint(itoa(pro / 10 % 10));
	
	if ((size / 2) - 0 >= perc) set_color(bgc, fgc);
	kprint(itoa(pro % 10));
	
	if ((size / 2) + 1 >= perc) set_color(bgc, fgc);
	kprint("%");
	
	
	color_load();
	cur_load();
	
	/*kprint("[");
	kprint(itoa(pro / 100 % 10));
	kprint("]");*/
	
}