dist/melonjs.js
function strokePolygon(poly, fill) {
         if (fill === true) {
           this.fillPolygon(poly);
         } else {
           var len = poly.points.length,
               points = this._glPoints,
               i; // Grow internal points buffer if necessary

           for (i = points.length; i < len; i++) {
             points.push(new me.Vector2d());
           } // calculate and draw all segments


           for (i = 0; i < len; i++) {
             points[i].x = poly.pos.x + poly.points[i].x;
             points[i].y = poly.pos.y + poly.points[i].y;
           }

           this.compositor.drawLine(points, len);
         }
       }
function strokePolygon(poly, fill) {
         if (fill === true) {
           this.fillPolygon(poly);
         } else {
           var len = poly.points.length,
               points = this._glPoints,
               i; // Grow internal points buffer if necessary

           for (i = points.length; i < len; i++) {
             points.push(new me.Vector2d());
           } // calculate and draw all segments


           for (i = 0; i < len; i++) {
             points[i].x = poly.pos.x + poly.points[i].x;
             points[i].y = poly.pos.y + poly.points[i].y;
           }

           this.compositor.drawLine(points, len);
         }
       }
function strokePolygon ( poly , fill ) { if ( fill === true ) { this . fillPolygon ( poly ) ; } else { var len = poly . points . length , points = this . _glPoints , i ; // Grow internal points buffer if necessary for ( i = points . length ; i < len ; i ++ ) { points . push ( new me . Vector2d ( ) ) ; } // calculate and draw all segments for ( i = 0 ; i < len ; i ++ ) { points [ i ] . x = poly . pos . x + poly . points [ i ] . x ; points [ i ] . y = poly . pos . y + poly . points [ i ] . y ; } this . compositor . drawLine ( points , len ) ; } }
Stroke a me.Polygon on the screen with a specified color
@name strokePolygon
@memberOf me.WebGLRenderer.prototype
@function
@param {me.Polygon} poly the shape to draw
Stroke a me . Polygon on the screen with a specified color