code: function (rect) {
  
              var wrapper = this,
                key,
                attribs = {},
                normalizer,
                strokeWidth = rect.strokeWidth || wrapper.strokeWidth || 0;
  
              normalizer = mathRound(strokeWidth) % 2 / 2; // mathRound because strokeWidth can sometimes have roundoff errors
  
              // normalize for crisp edges
              rect.x = mathFloor(rect.x || wrapper.x || 0) + normalizer;
              rect.y = mathFloor(rect.y || wrapper.y || 0) + normalizer;
              rect.width = mathFloor((rect.width || wrapper.width || 0) - 2 * normalizer);
              rect.height = mathFloor((rect.height || wrapper.height || 0) - 2 * normalizer);
              rect.strokeWidth = strokeWidth;
  
              for (key in rect) {
                  if (wrapper[key] !== rect[key]) { // only set attribute if changed
                      wrapper[key] = attribs[key] = rect[key];
                  }
              }
  
              return attribs;
          }
docs: Calculate the coordinates needed for drawing a rectangle crisply and return the
  calculated attributes
  @param {Number} strokeWidth
  @param {Number} x
  @param {Number} y
  @param {Number} width
  @param {Number} height