Get current line height
8802
function lineHeight( $options = array() )
    {
        if ( is_array( $options ) && isset( $options['size'] ) )
        {
            $size = $options['size'];
        }
        else
        {
            $size = $this->ez['fontSize'];
        }

        if ( is_array( $options ) && isset( $options['leading'] ) )
        {   // use leading instead of spacing
            $height = $options['leading'];
        }
        else if ( is_array( $options ) && isset( $options['spacing'] ) )
        {
            $height = $this->getFontHeight( $size ) * $options['spacing'];
        }
        else
        {
            $height = $this->getFontHeight( $size );
        }

        return $height;
    }
1316302
def last_visible_line(self, before_scroll_offset=False):
        
        if before_scroll_offset:
            return self.displayed_lines[-1 - self.applied_scroll_offsets.bottom]
        else:
            return self.displayed_lines[-1]
482058
function getPixelHeight(element) {

        var heightString = getStyleOrAttrib(element, 'height');

        var heightNumber = parseInt(heightString, 10);

        if (isPercentageBasedSize(heightString)) {
          heightNumber = 0;
        }

        return !isNaN(heightNumber) && heightNumber > 0 ?
          heightNumber : getComputedStyleSize(element, 'height');
      }
449007
function estimateHeight(cm) {
    var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;
    var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);
    return function(line) {
      if (lineIsHidden(cm.doc, line)) return 0;

      var widgetsHeight = 0;
      if (line.widgets) for (var i = 0; i < line.widgets.length; i++) {
        if (line.widgets[i].height) widgetsHeight += line.widgets[i].height;
      }

      if (wrapping)
        return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th;
      else
        return widgetsHeight + th;
    };
  }
1081573
def get_size(self):
        """"""
        self.curses.setupterm()
        return self.curses.tigetnum('cols'), self.curses.tigetnum('lines')
387654
function getClearedHeight(e) {
                    var height = e.height();

                    e.children().each(function () {
                        height = Math.max(height, $(this).height());
                    });

                    return height;
                }
1030077
def scroll_one_line_up(event):
    
    w = find_window_for_buffer_name(event.cli, event.cli.current_buffer_name)
    b = event.cli.current_buffer

    if w:
        # When the cursor is at the bottom, move to the previous line. (Otherwise, only scroll.)
        if w.render_info:
            info = w.render_info

            if w.vertical_scroll > 0:
                first_line_height = info.get_height_for_line(info.first_visible_line())

                cursor_up = info.cursor_position.y - (info.window_height - 1 - first_line_height -
                                                      info.configured_scroll_offsets.bottom)

                # Move cursor up, as many steps as the height of the first line.
                # TODO: not entirely correct yet, in case of line wrapping and many long lines.
                for _ in range(max(0, cursor_up)):
                    b.cursor_position += b.document.get_cursor_up_position()

                # Scroll window
                w.vertical_scroll -= 1
725509
def linewidth(self, linewidth=None):
        """"""

        if linewidth is None:
            return self._linewidth
        else:
            if not is_numeric(linewidth):
                raise TypeError(
                 "linewidth must be number, not '%s'" % str(linewidth)
                )
            self._linewidth = linewidth
752884
function uline( $info )
    {
        // a callback function to support underlining
        $lineFactor = 0.05; // the thickness of the line as a proportion of the height. also the drop of the line.
        switch ( $info['status'] )
        {
            case 'start':
            case 'sol':
                // the beginning of the underline zone
                if ( !isset( $this->ez['links'] ) )
                {
                    $this->ez['links'] = array();
                }
                $i = $info['nCallback'];
                $this->ez['links'][$i] = array( 'x' => $info['x'],
                                                'y' => $info['y'],
                                                'angle' => $info['angle'],
                                                'decender' => $info['decender'],
                                                'height' => $info['height'] );
                $this->saveState();
                $thick = $info['height'] * $lineFactor;
                $this->setLineStyle( $thick );
                break;

            case 'end':
            case 'eol':
                // the end of the link
                // assume that it is the most recent opening which has closed
                $i = $info['nCallback'];
                $start = $this->ez['links'][$i];
                // add underlining
                $a = deg2rad( (float) $start['angle'] - 90.0 );
                $drop = $start['height'] * $lineFactor * 1.5;
                $dropx = cos( $a ) * $drop;
                $dropy = -sin( $a ) * $drop;
                $this->line( $start['x'] - $dropx, $start['y'] - $dropy, $info['x'] - $dropx, $info['y'] - $dropy );
                $this->restoreState();
                break;
        }
    }
691062
def get_line_style(line):
    """"""
    style = {}
    style['alpha'] = line.get_alpha()
    if style['alpha'] is None:
        style['alpha'] = 1
    style['color'] = color_to_hex(line.get_color())
    style['linewidth'] = line.get_linewidth()
    style['dasharray'] = get_dasharray(line)
    style['zorder'] = line.get_zorder()
    return style
905080
def get_current_line(self):
        """"""
        if not self.has_space():
            return None

        pos = self.pos - self.col
        string = self.string
        end = self.length

        output = []
        while pos < len(string) and string[pos] != '\n':
            output.append(string[pos])
            pos += 1
            if pos == end:
                break
        else:
            output.append(string[pos])

        if not output:
            return None

        return SourceLine(''.join(output), self.row)
97180
def getActualLineWidths0(self):
        

        assert hasattr(self, 'width'), "Cannot call this method before wrap()"
        if self.blPara.kind:
            func = lambda frag, w=self.width: w - frag.extraSpace
        else:
            func = lambda frag, w=self.width: w - frag[0]
        return map(func, self.blPara.lines)
1100422
function () {
        var self = this;

        if (!self.settings.multiline) {
          self.getEl().style.lineHeight = self.layoutRect().h + 'px';
        }

        return self._super();
      }
831616
public function getCurrentStyleHeight(): float
    {
        if (empty($this->currentStyle)) {
            return $this->default_font_size;
        }
        $style = $this->getStyle($this->currentStyle);

        return $style['size'];
    }
992930
def _get_pos(self):
        
        if self._canvas.height >= self._max_height:
            return 0
        else:
            return self._canvas.start_line / (self._max_height - self._canvas.height + 1)
1043728
public function getLineHeight()
    {
        $val = $this->value['line-height'];
        if ($val=='normal') $val = '108%';
        return $this->convertToMM($val, $this->value['font-size']);
    }
490712
def line_nbr_from_position(self, y_pos):
        
        editor = self._editor
        height = editor.fontMetrics().height()
        for top, line, block in editor.visible_blocks:
            if top <= y_pos <= top + height:
                return line
        return -1