Skip to content
ExamplesOpen editor ↗

sebakaSaMela

→ textLeading()

Sets the gap between lines of text, in pixels.

sebakaSaMela(leading) | sebakaSaMela()

It shows only when text has several lines — either from thalaMokwalo’s box, or from a \n inside the string itself.

By default the gap is 1.25 times bogoloJwaMokwalo, and it moves when the size moves. Once you set it yourself it stays where you put it: the text size no longer changes it.

The name is sebaka sa mela — the space of the lines. In Bopa a mola is a line of text, while a mothalo is the line thalaMothalo draws.

NameTypeDescription
sebaka (optional)paloThe gap between lines, in pixels.
The same text at two leadings
tiro setaLoeto() {
  thalaKanefase(400, 300);
  bokamorago(240);
  tlogelaMothalo();
  tlatsaMmala(30, 40, 60);
  bogoloJwaMokwalo(16);

  metlha mafoko = 'Motho ke motho\nka batho ba bangwe';

  sebakaSaMela(18);
  thalaMokwalo(mafoko, 30, 50);

  sebakaSaMela(40);
  thalaMokwalo(mafoko, 30, 170);

  tlhalosa('Seane se le sengwe se kwadilwe gabedi: la ntlha mela e le gaufi, la bobedi e le kgakala.');
}

thalaMokwalo, bogoloJwaMokwalo, kgaoloMokwalo