<b>읽기전용</b>
타겟타입:(Selector, Element)
Padding, Border, 스크롤바 포함된 세로사이즈 반환
@param   {Boolean}   includeMargin   margin 포함여부
@return	{Number}
178862
function ( includeMargin ) {
            var el = this.element(),
                margin = 0;
    
            if ( el === window ) {
                if ( window.outerHeight ) {
                    return window.outerHeight;
                } else {
                    return $B.measure.windowHeight();
                }
            } else if ( el === document ) {
                return $B.measure.documentHeight();
            } else if ( el === screen ) {
                return screen.height;
            } else {
                if ( includeMargin === true ) {
                    var marginT = parseFloat( $B( el ).css( 'margin-top' ) ),
                        marginB = parseFloat( $B( el ).css( 'margin-bottom' ) );
    
                    if ( marginT ) margin += marginT;
                    if ( marginB ) margin += marginB;
                }
    
                return el.offsetHeight + margin;
            }
        }
691118
function SetMargins() {
    /////////////////////////////////////////////////////////////////
    // When the image is first created - set the margins
    // to be the standard viewport.
    // The standard viewport is the full area of the view surface (or panel),
    // less a margin of 4 character heights all round for labelling.
    // It thus depends on the current character size, set by SetCharacterHeight().
    /////////////////////////////////////////////////////////////////

    $str = preg_split("/\n/",$this->title_txt);
    $nbLines = count($str);

    if ($this->use_ttf == 1) {
      $title_size = $this->TTFBBoxSize($this->title_ttffont_size, $this->title_angle, $this->title_ttffont, 'X'); //An array
      if ($nbLines == 1) {
        $this->y_top_margin = $title_size[1] * 4;
      } else {
        $this->y_top_margin = $title_size[1] * ($nbLines+3);
      }

      //ajo working here
      //$x_label_size = $this->TTFBBoxSize($this->x_label_ttffont_size, 0, $this->axis_ttffont, $this->x_label_txt);

      $this->y_bot_margin = $this->x_label_height ;
      $this->x_left_margin = $this->y_label_width * 2 + $this->tick_length;
      $this->x_right_margin = 33.0; // distance between right and end of x axis in pixels
    } else {
      $title_size = array(ImageFontWidth($this->title_font) * strlen($this->title_txt),ImageFontHeight($this->title_font));
      //$this->y_top_margin = ($title_size[1] * 4);
      if ($nbLines == 1) {
        $this->y_top_margin = $title_size[1] * 4;
      } else {
        $this->y_top_margin = $title_size[1] * ($nbLines+3);
      }
      if ($this->x_datalabel_angle == 90) {
        $this->y_bot_margin = 76.0; // Must be integer
      } else {
        $this->y_bot_margin = 66.0; // Must be integer
      }
      $this->x_left_margin = 77.0; // distance between left and start of x axis in pixels
      $this->x_right_margin = 33.0; // distance between right and end of x axis in pixels
    }

//exit;
    $this->x_tot_margin = $this->x_left_margin + $this->x_right_margin;
    $this->y_tot_margin = $this->y_top_margin + $this->y_bot_margin;

    if ($this->plot_max_x && $this->plot_max_y && $this->plot_area_width ) { //If data has already been analysed then set translation
      $this->SetTranslation();
    }
  }
1165817
function() {
      // take padding and border pixels from highlights div
      let padding = this.$highlights.css([
        "padding-top",
        "padding-right",
        "padding-bottom",
        "padding-left"
      ]);
      let border = this.$highlights.css([
        "border-top-width",
        "border-right-width",
        "border-bottom-width",
        "border-left-width"
      ]);
      this.$highlights.css({
        padding: "0",
        "border-width": "0"
      });

      this.$backdrop
        .css({
          // give padding pixels to backdrop div
          "margin-top": "+=" + padding["padding-top"],
          "margin-right": "+=" + padding["padding-right"],
          "margin-bottom": "+=" + padding["padding-bottom"],
          "margin-left": "+=" + padding["padding-left"]
        })
        .css({
          // give border pixels to backdrop div
          "margin-top": "+=" + border["border-top-width"],
          "margin-right": "+=" + border["border-right-width"],
          "margin-bottom": "+=" + border["border-bottom-width"],
          "margin-left": "+=" + border["border-left-width"]
        });
    }
796052
public boolean setMargins(float marginLeft, float marginRight, float marginTop, float marginBottom) {
        if (writer != null && writer.isPaused()) {
            return false;
        }
        nextMarginLeft = marginLeft;
        nextMarginRight = marginRight;
        nextMarginTop = marginTop;
        nextMarginBottom = marginBottom;
        return true;
    }
303181
function getHTMLElementContentRect(target) {
    // Client width & height properties can't be
    // used exclusively as they provide rounded values.
    const {clientWidth, clientHeight} = target;

    // By this condition we can catch all non-replaced inline, hidden and
    // detached elements. Though elements with width & height properties less
    // than 0.5 will be discarded as well.
    //
    // Without it we would need to implement separate methods for each of
    // those cases and it's not possible to perform a precise and performance
    // effective test for hidden elements. E.g. even jQuery's ':visible' filter
    // gives wrong results for elements with width & height less than 0.5.
    if (!clientWidth && !clientHeight) {
        return emptyRect;
    }

    const styles = getWindowOf(target).getComputedStyle(target);
    const paddings = getPaddings(styles);
    const horizPad = paddings.left + paddings.right;
    const vertPad = paddings.top + paddings.bottom;

    // Computed styles of width & height are being used because they are the
    // only dimensions available to JS that contain non-rounded values. It could
    // be possible to utilize the getBoundingClientRect if only it's data wasn't
    // affected by CSS transformations let alone paddings, borders and scroll bars.
    let width = toFloat(styles.width),
        height = toFloat(styles.height);

    // Width & height include paddings and borders when the 'border-box' box
    // model is applied (except for IE).
    if (styles.boxSizing === 'border-box') {
        // Following conditions are required to handle Internet Explorer which
        // doesn't include paddings and borders to computed CSS dimensions.
        //
        // We can say that if CSS dimensions + paddings are equal to the "client"
        // properties then it's either IE, and thus we don't need to subtract
        // anything, or an element merely doesn't have paddings/borders styles.
        if (Math.round(width + horizPad) !== clientWidth) {
            width -= getBordersSize(styles, 'left', 'right') + horizPad;
        }

        if (Math.round(height + vertPad) !== clientHeight) {
            height -= getBordersSize(styles, 'top', 'bottom') + vertPad;
        }
    }

    // Following steps can't be applied to the document's root element as its
    // client[Width/Height] properties represent viewport area of the window.
    // Besides, it's as well not necessary as the <html> itself neither has
    // rendered scroll bars nor it can be clipped.
    if (!isDocumentElement(target)) {
        // In some browsers (only in Firefox, actually) CSS width & height
        // include scroll bars size which can be removed at this step as scroll
        // bars are the only difference between rounded dimensions + paddings
        // and "client" properties, though that is not always true in Chrome.
        const vertScrollbar = Math.round(width + horizPad) - clientWidth;
        const horizScrollbar = Math.round(height + vertPad) - clientHeight;

        // Chrome has a rather weird rounding of "client" properties.
        // E.g. for an element with content width of 314.2px it sometimes gives
        // the client width of 315px and for the width of 314.7px it may give
        // 314px. And it doesn't happen all the time. So just ignore this delta
        // as a non-relevant.
        if (Math.abs(vertScrollbar) !== 1) {
            width -= vertScrollbar;
        }

        if (Math.abs(horizScrollbar) !== 1) {
            height -= horizScrollbar;
        }
    }

    return createRectInit(paddings.left, paddings.top, width, height);
}
84717
public BoundingBox extendMargin(float margin) {
        if (margin == 1) {
            return this;
        } else if (margin <= 0) {
            throw new IllegalArgumentException("BoundingBox extend operation does not accept negative or zero values");
        }

        double verticalExpansion = (this.getLatitudeSpan() * margin - this.getLatitudeSpan()) * 0.5;
        double horizontalExpansion = (this.getLongitudeSpan() * margin - this.getLongitudeSpan()) * 0.5;

        double minLat = Math.max(MercatorProjection.LATITUDE_MIN, this.minLatitude - verticalExpansion);
        double minLon = Math.max(-180, this.minLongitude - horizontalExpansion);
        double maxLat = Math.min(MercatorProjection.LATITUDE_MAX, this.maxLatitude + verticalExpansion);
        double maxLon = Math.min(180, this.maxLongitude + horizontalExpansion);

        return new BoundingBox(minLat, minLon, maxLat, maxLon);
    }
557785
function () {
                var cfg = this._cfg, state = cfg.stateObject;
                if (!cfg.fullWidth && cfg.width > -1) {
                    var w = cfg.width - state.marginLeft - state.marginRight;
                    if (this._hasBorder(state.skipLeftBorder, cfg.iconsLeft)) {
                        // remove the size of the left border if there is one:
                        w -= state.spcLeft;
                    }
                    if (this._hasBorder(state.skipRightBorder, cfg.iconsRight)) {
                        // remove the size of the right border if there is one:
                        w -= (state.sprWidth - state.spcLeft);
                    }
                    this.innerWidth = w > 0 ? w : 0;
                } else {
                    this.innerWidth = -1;
                }

                if (state.verticalAlign && state.innerHeight) {
                    this.innerHeight = ariaUtilsType.isNumber(state.innerHeight) ? state.innerHeight : -1;
                } else {
                    this.innerHeight = state.sprHeight - state.marginTop - state.marginBottom;
                }
            }
807393
function getDomains (display, height, width, bounds, options) {
  var xmin = bounds[0][0]
  var xmax = bounds[1][0]
  var ymin = bounds[0][1]
  var ymax = bounds[1][1]
  var xRange = xmax - xmin
  var yRange = ymax - ymin

  var paddingFactor = (options && options.paddingFactor)
    ? options.paddingFactor
    : 0.1

  var margins = getMargins(options)

  var usableHeight = height - margins.top - margins.bottom
  var usableWidth = width - margins.left - margins.right
  var displayAspect = width / height
  var usableDisplayAspect = usableWidth / usableHeight
  var graphAspect = xRange / (yRange === 0 ? -Infinity : yRange)

  var padding
  var dispX1, dispX2, dispY1, dispY2
  var dispXRange, dispYRange

  if (usableDisplayAspect > graphAspect) { // y-axis is limiting
    padding = paddingFactor * yRange
    dispY1 = ymin - padding
    dispY2 = ymax + padding
    dispYRange = yRange + 2 * padding
    var addedYRange = (height / usableHeight * dispYRange) - dispYRange
    if (margins.top > 0 || margins.bottom > 0) {
      dispY1 -= margins.bottom / (margins.bottom + margins.top) * addedYRange
      dispY2 += margins.top / (margins.bottom + margins.top) * addedYRange
    }
    dispXRange = (dispY2 - dispY1) * displayAspect
    var xOffset = (margins.left - margins.right) / width
    var xMidpoint = (xmax + xmin - dispXRange * xOffset) / 2
    dispX1 = xMidpoint - dispXRange / 2
    dispX2 = xMidpoint + dispXRange / 2
  } else { // x-axis limiting
    padding = paddingFactor * xRange
    dispX1 = xmin - padding
    dispX2 = xmax + padding
    dispXRange = xRange + 2 * padding
    var addedXRange = (width / usableWidth * dispXRange) - dispXRange
    if (margins.left > 0 || margins.right > 0) {
      dispX1 -= margins.left / (margins.left + margins.right) * addedXRange
      dispX2 += margins.right / (margins.left + margins.right) * addedXRange
    }

    dispYRange = (dispX2 - dispX1) / displayAspect
    var yOffset = (margins.bottom - margins.top) / height
    var yMidpoint = (ymax + ymin - dispYRange * yOffset) / 2
    dispY1 = yMidpoint - dispYRange / 2
    dispY2 = yMidpoint + dispYRange / 2
  }

  return [
    [dispX1, dispX2],
    [dispY1, dispY2]
  ]
}
534260
function rightMargin( $yOffset = false )
    {
        if ( $yOffset === false )
        {
            $yOffset = $this->yOffset();
        }

        foreach ( $this->RightMarginArray as $rightMargin )
        {
            if ( $yOffset > $rightMargin['start'] &&
                 $yOffset < $rightMargin['stop'] )
            {
                return $rightMargin['margin'];
            }
        }

        return $this->ez['rightMargin'];
    }
716550
function(){
                /*
                 * margin :
                 *    margin_sym S* '{' declaration [ ';' S* declaration? ]* '}' S*
                 *    ;
                 */
                var tokenStream = this._tokenStream,
                    line,
                    col,
                    marginSym   = this._margin_sym();

                if (marginSym){
                    line = tokenStream.token().startLine;
                    col = tokenStream.token().startCol;

                    this.fire({
                        type: "startpagemargin",
                        margin: marginSym,
                        line:   line,
                        col:    col
                    });

                    this._readDeclarations(true);

                    this.fire({
                        type: "endpagemargin",
                        margin: marginSym,
                        line:   line,
                        col:    col
                    });
                    return true;
                } else {
                    return false;
                }
            }
883395
function getInclude() {
  const type = tokens[pos].include_type;

  if (type === 1) return getInclude1();
  if (type === 2) return getInclude2();
  if (type === 3) return getInclude3();
  if (type === 4) return getInclude4();
  if (type === 5) return getInclude5();
  if (type === 6) return getInclude6();
  if (type === 7) return getInclude7();
  if (type === 8) return getInclude8();
  if (type === 9) return getIncludeWithKeyframes1();
  if (type === 10) return getIncludeWithKeyframes2();
}
455715
function removeLeftMargin( code ) {
  var margin = 999;
  var lines = code.split("\n");
  lines.forEach(function (line) {
    var s = line.length;
    var m = 0;
    while( m < s && line.charAt(m) == ' ' ) m++;
    margin = Math.min( m, margin );
  });
  return lines.map(function(line) {
    return line.substr( margin );
  }).join("\n");
}
1052423
function getBBox(element, getPaddingBox) {
  const rect = element.getBoundingClientRect(),
    bBox = {left: rect.left, top: rect.top, width: rect.width, height: rect.height};
  bBox.left += window.pageXOffset;
  bBox.top += window.pageYOffset;
  if (getPaddingBox) {
    const style = window.getComputedStyle(element, ''),
      borderTop = parseFloat(style.borderTopWidth) || 0,
      borderRight = parseFloat(style.borderRightWidth) || 0,
      borderBottom = parseFloat(style.borderBottomWidth) || 0,
      borderLeft = parseFloat(style.borderLeftWidth) || 0;
    bBox.left += borderLeft;
    bBox.top += borderTop;
    bBox.width -= borderLeft + borderRight;
    bBox.height -= borderTop + borderBottom;
  }
  return validBBox(bBox);
}
1238085
function getSideMargins (style) {
  const margins = compact(style.split(';')).map((decl) => {
    const split = decl.split(':')

    return {
      prop: first(split).trim().toLowerCase(),
      value: last(split).trim().toLowerCase()
    }
  }).filter(({ prop, value }) => prop.indexOf('margin') === 0)

  let left = 0
  let right = 0
  margins.forEach(({ prop, value }) => {
    if (prop === 'margin-left') {
      left = value
      return
    }

    if (prop === 'margin-right') {
      right = value
      return
    }

    if (prop === 'margin') {
      const values = value.split(' ').map((i) => i.trim())

      switch (values.length) {
        case 1:
          right = first(values)
          left = first(values)
          break

        case 2:
          right = last(values)
          left = last(values)
          break

        case 3:
          right = nth(values, 1)
          left = nth(values, 1)
          break

        default:
          right = nth(values, 1)
          left = nth(values, 3)
          break
      }
    }
  })

  return { left, right }
}
350788
def get_margin(length):
    """"""
    if length > 23:
        margin_left = "\t"
        chars = 1
    elif length > 15:
        margin_left = "\t\t"
        chars = 2
    elif length > 7:
        margin_left = "\t\t\t"
        chars = 3
    else:
        margin_left = "\t\t\t\t"
        chars = 4
    return margin_left
575708
public void setMargin(@Nullable String marginString) {
        if (!TextUtils.isEmpty(marginString)) {
            // remove leading and ending '[' ']'
            try {
                marginString = marginString.trim().substring(1, marginString.length() - 1);
                String marginStringArray[] = marginString.split(",");
                int size = marginStringArray.length > 4 ? 4 : marginStringArray.length;
                for (int i = 0; i < size; i++) {
                    String marginStr = marginStringArray[i];
                    if (!TextUtils.isEmpty(marginStr)) {
                        margin[i] = parseSize(marginStr.trim().replace("\"", ""), 0);
                    } else {
                        margin[i] = 0;
                    }
                }
                Arrays.fill(margin, size, margin.length, margin[size - 1]);
            } catch (Exception e) {
                Arrays.fill(margin, 0);
            }
        }
    }
860870
function CSSStyleDeclaration(element) {
			var
			style = this,
			currentStyle = element.currentStyle,
			fontSize = getComputedStylePixel(element, 'fontSize'),
			unCamelCase = function (match) {
				return '-' + match.toLowerCase();
			},
			property;

			for (property in currentStyle) {
				Array.prototype.push.call(style, property === 'styleFloat' ? 'float' : property.replace(/[A-Z]/, unCamelCase));

				if (property === 'width') {
					style[property] = element.offsetWidth + 'px';
				} else if (property === 'height') {
					style[property] = element.offsetHeight + 'px';
				} else if (property === 'styleFloat') {
					style.float = currentStyle[property];
				} else if (/margin.|padding.|border.+W/.test(property) && style[property] !== 'auto') {
					style[property] = Math.round(getComputedStylePixel(element, property, fontSize)) + 'px';
				} else if (/^outline/.test(property)) {
					// errors on checking outline
					try {
						style[property] = currentStyle[property];
					} catch (error) {
						style.outlineColor = currentStyle.color;
						style.outlineStyle = style.outlineStyle || 'none';
						style.outlineWidth = style.outlineWidth || '0px';
						style.outline = [style.outlineColor, style.outlineWidth, style.outlineStyle].join(' ');
					}
				} else {
					style[property] = currentStyle[property];
				}
			}

			setShortStyleProperty(style, 'margin');
			setShortStyleProperty(style, 'padding');
			setShortStyleProperty(style, 'border');

			style.fontSize = Math.round(fontSize) + 'px';
		}