js/gfx/round.js
/*
The MIT License (MIT)

Copyright (c) 2014 Xavier Hardy

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
The MIT License (MIT)
Copyright (c) 2014 Xavier Hardy

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions.

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.


The MIT License ( MIT ) Copyright ( c ) 2014 Xavier Hardy Permission is hereby granted free of charge to any person obtaining a copy of this software and associated documentation files ( the " Software " ) to deal in the Software without restriction including without limitation the rights to use copy modify merge publish distribute sublicense and / or sell copies of the Software and to permit persons to whom the Software is furnished to do so subject to the following conditions . The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software .
function Round(cnvs){
	this.prototype = new DrawnObject(cnvs);
	this.prototype.constructor = this;
	this.update = function(){DrawnObject.prototype.update.call(this);};
	this.clearBuffer = function(){DrawnObject.prototype.clearBuffer.call(this);};
	this.init = function(){DrawnObject.prototype.init.call(this);};
	this.canvasContext = cnvs.getContext("2d");
	this.outerRadius = 100;
	this.innerRadius = 10;
	this.setStart(90);
	this.setEnd(270);
	this.setCursorSize(5);
	this.colors = [new Section(0.5,"#00FF00"), new Section(0.75, "#FFFF00"), new Section(1,"#FF0000")];
	this.borderSize = 3;
	this.borderColor = "#000000";
	this.separateSections = false;
	this.font = "10px sans-serif";
	this.fontColor = "#000000";
	this.size = 0;
	this.bw = 0;
	this.bh = 0;
	this.bufferX = -1;
	this.drawBackground();
	this.cursor = 0;
	this.startSpeed = 0.07;
	this.speed = this.startSpeed;
	this.nextCursor = this.cursor;
	return this;
}
function Round ( cnvs ) { this . prototype = new DrawnObject ( cnvs ) ; this . prototype . constructor = this ; this . update = function ( ) { DrawnObject . prototype . update . call ( this ) ; } ; this . clearBuffer = function ( ) { DrawnObject . prototype . clearBuffer . call ( this ) ; } ; this . init = function ( ) { DrawnObject . prototype . init . call ( this ) ; } ; this . canvasContext = cnvs . getContext ( "2d" ) ; this . outerRadius = 100 ; this . innerRadius = 10 ; this . setStart ( 90 ) ; this . setEnd ( 270 ) ; this . setCursorSize ( 5 ) ; this . colors = [ new Section ( 0.5 , "#00FF00" ) , new Section ( 0.75 , "#FFFF00" ) , new Section ( 1 , "#FF0000" ) ] ; this . borderSize = 3 ; this . borderColor = "#000000" ; this . separateSections = false ; this . font = "10px sans-serif" ; this . fontColor = "#000000" ; this . size = 0 ; this . bw = 0 ; this . bh = 0 ; this . bufferX = - 1 ; this . drawBackground ( ) ; this . cursor = 0 ; this . startSpeed = 0.07 ; this . speed = this . startSpeed ; this . nextCursor = this . cursor ; return this ; }
The MIT License (MIT)
Copyright (c) 2014 Xavier Hardy
The MIT License ( MIT ) Copyright ( c ) 2014 Xavier Hardy