Advertisement
Aveneid

Untitled

Dec 18th, 2017
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function drawBar(x,y,px,py,value,color){
  2.     context.fillStyle = "#8e8c8c";
  3.     context.fillRect(x,y,x+px,y+py);
  4.    
  5.     context.fillStyle = color;
  6.     var percent = px*(value)/100.0;
  7.     context.fillRect(x,y,x+percent,y+py);
  8. }
  9.  
  10.  
  11. drawBar(10,10,50,10,50,"#FF0");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement