q5play
    Preparing search index...

    Function textLeading

    • 📘 Sets or gets the current line height. If no argument is provided, returns the current line height.

      Parameters

      • Optionalleading: number

        line height in pixels

      Returns number | void

      current line height when no argument is provided

      q5.draw = function () {
      background(0.8);

      textSize(abs(mouseX));
      text('A', -90, 90);
      rect(-90, 90, 5, -textLeading());
      };