code: function(viewport) {
              var width = this.size.x;
              var height = this.size.y;
              if (this.width !== null || this.height !== null) {
                  var scaledSize = viewport.deltaPixelsFromPointsNoRotate(
                      new $.Point(this.width || 0, this.height || 0), true);
                  if (this.width !== null) {
                      width = scaledSize.x;
                  }
                  if (this.height !== null) {
                      height = scaledSize.y;
                  }
              }
              if (this.checkResize &&
                  (this.width === null || this.height === null)) {
                  var eltSize = this.size = $.getElementSize(this.element);
                  if (this.width === null) {
                      width = eltSize.x;
                  }
                  if (this.height === null) {
                      height = eltSize.y;
                  }
              }
              return new $.Point(width, height);
          }
docs: private