moveTo(angle){
        if(Math.abs(angle - this.angle) > this.tolerance || this.draw_test(this.angle - this.delta_base,this.angle + this.delta_base ,this.last_draw_time) ){
            //var background = color_schemes[color_scheme_index].background;
            var background = this.color_bg_supplier;
            g.setColor(background[0],background[1],background[2]);
            g.fillPoly([this.last_x1,
                this.last_y1,
                this.last_x2,
                this.last_y2,
                this.last_x3,
                this.last_y3,
                this.last_x4,
                this.last_y4
            ]);
            // bottom left
            var x1 = this.centerX +
                this.vertex_radius_base*Math.sin(angle - this.delta_base);
            var y1 = this.centerY - this.vertex_radius_base*Math.cos(angle - this.delta_base);
            // bottom right
            var x2 = this.centerX +
                this.vertex_radius_base*Math.sin(angle + this.delta_base);
            var y2 = this.centerY - this.vertex_radius_base*Math.cos(angle + this.delta_base);
            // top right
            var x3 = this.centerX + this.vertex_radius_top*Math.sin(angle + this.delta_top);
            var y3 = this.centerY - this.vertex_radius_top*Math.cos(angle + this.delta_top);
            // top left
            var x4 = this.centerX + this.vertex_radius_top*Math.sin(angle - this.delta_top);
            var y4 = this.centerY - this.vertex_radius_top*Math.cos(angle - this.delta_top);
            //var hand_color = color_schemes[color_scheme_index][this.color_theme];
            var hand_color = this.color_fg_supplier();
            g.setColor(hand_color[0],hand_color[1],hand_color[2]);
            g.fillPoly([x1,y1,
                x2,y2,
                x3,y3,
                x4,y4
            ]);
            this.last_x1 = x1;
            this.last_y1 = y1;
            this.last_x2 = x2;
            this.last_y2 = y2;
            this.last_x3 = x3;
            this.last_y3 = y3;
            this.last_x4 = x4;
            this.last_y4 = y4;
            this.angle = angle;
            this.last_draw_time = new Date();
            return true;
        } else {
            return false;
        }
    }
// method to move the hand to a new angle
method to move the hand to a new angle
method to move the hand to a new angle
moveTo(angle){
        if(Math.abs(angle - this.angle) > this.tolerance || this.draw_test(this.angle - this.delta_base,this.angle + this.delta_base ,this.last_draw_time) ){
            var background = this.color_bg_supplier;
            g.setColor(background[0],background[1],background[2]);
            g.fillPoly([this.last_x1,
                this.last_y1,
                this.last_x2,
                this.last_y2,
                this.last_x3,
                this.last_y3,
                this.last_x4,
                this.last_y4
            ]);
            var x1 = this.centerX +
                this.vertex_radius_base*Math.sin(angle - this.delta_base);
            var y1 = this.centerY - this.vertex_radius_base*Math.cos(angle - this.delta_base);
            var x2 = this.centerX +
                this.vertex_radius_base*Math.sin(angle + this.delta_base);
            var y2 = this.centerY - this.vertex_radius_base*Math.cos(angle + this.delta_base);
            var x3 = this.centerX + this.vertex_radius_top*Math.sin(angle + this.delta_top);
            var y3 = this.centerY - this.vertex_radius_top*Math.cos(angle + this.delta_top);
            var x4 = this.centerX + this.vertex_radius_top*Math.sin(angle - this.delta_top);
            var y4 = this.centerY - this.vertex_radius_top*Math.cos(angle - this.delta_top);
            var hand_color = this.color_fg_supplier();
            g.setColor(hand_color[0],hand_color[1],hand_color[2]);
            g.fillPoly([x1,y1,
                x2,y2,
                x3,y3,
                x4,y4
            ]);
            this.last_x1 = x1;
            this.last_y1 = y1;
            this.last_x2 = x2;
            this.last_y2 = y2;
            this.last_x3 = x3;
            this.last_y3 = y3;
            this.last_x4 = x4;
            this.last_y4 = y4;
            this.angle = angle;
            this.last_draw_time = new Date();
            return true;
        } else {
            return false;
        }
    }
moveTo ( angle ) { if ( Math . abs ( angle - this . angle ) > this . tolerance || this . draw_test ( this . angle - this . delta_base , this . angle + this . delta_base , this . last_draw_time ) ) { var background = this . color_bg_supplier ; g . setColor ( background [ 0 ] , background [ 1 ] , background [ 2 ] ) ; g . fillPoly ( [ this . last_x1 , this . last_y1 , this . last_x2 , this . last_y2 , this . last_x3 , this . last_y3 , this . last_x4 , this . last_y4 ] ) ; var x1 = this . centerX + this . vertex_radius_base * Math . sin ( angle - this . delta_base ) ; var y1 = this . centerY - this . vertex_radius_base * Math . cos ( angle - this . delta_base ) ; var x2 = this . centerX + this . vertex_radius_base * Math . sin ( angle + this . delta_base ) ; var y2 = this . centerY - this . vertex_radius_base * Math . cos ( angle + this . delta_base ) ; var x3 = this . centerX + this . vertex_radius_top * Math . sin ( angle + this . delta_top ) ; var y3 = this . centerY - this . vertex_radius_top * Math . cos ( angle + this . delta_top ) ; var x4 = this . centerX + this . vertex_radius_top * Math . sin ( angle - this . delta_top ) ; var y4 = this . centerY - this . vertex_radius_top * Math . cos ( angle - this . delta_top ) ; var hand_color = this . color_fg_supplier ( ) ; g . setColor ( hand_color [ 0 ] , hand_color [ 1 ] , hand_color [ 2 ] ) ; g . fillPoly ( [ x1 , y1 , x2 , y2 , x3 , y3 , x4 , y4 ] ) ; this . last_x1 = x1 ; this . last_y1 = y1 ; this . last_x2 = x2 ; this . last_y2 = y2 ; this . last_x3 = x3 ; this . last_y3 = y3 ; this . last_x4 = x4 ; this . last_y4 = y4 ; this . angle = angle ; this . last_draw_time = new Date ( ) ; return true ; } else { return false ; } }
method to move the hand to a new angle
method to move the hand to a new angle
//var background = color_schemes[color_scheme_index].background; // bottom left // bottom right // top right // top left //var hand_color = color_schemes[color_scheme_index][this.color_theme];