Skip to content
ExamplesOpen editor ↗

feleletsaPopego

→ endShape()

Finishes the shape you have been building — and this is where it is actually drawn.

feleletsaPopego() | feleletsaPopego(TSWALA)

Calling feleletsaPopego() turns every vertex you added into a shape: it is outlined with the stroke colour in force, and filled with the fill colour in force.

By default the shape is not closed. The first and last vertices are not joined. To join them, pass TSWALA: feleletsaPopego(TSWALA).

When the shape was built from ntlhanaKonego, TSWALA closes it smoothly — it does not add a corner, it adds another curve so the line comes back round to the start without a kink.

⚠ Calling feleletsaPopego when you never began anything does not throw — nothing simply happens. That is unlike ntlhana, which can throw when called outside a shape.

NameTypeDescription
mokgwa (optional)tlhomamengPass TSWALA to join the first and last vertices.
The same shape, open and closed
tiro setaLoeto() {
  thalaKanefase(400, 220);
  bokamorago(240);
  tlogelaGoTlatsa();
  mothaloMmala(30, 90, 170);
  boketeMothalo(4);

  // Ka fa molemeng — e bulegile
  simololaPopego();
  ntlhana(40, 40);
  ntlhana(160, 40);
  ntlhana(100, 180);
  feleletsaPopego();

  // Ka fa mojeng — e tswetswe
  simololaPopego();
  ntlhana(240, 40);
  ntlhana(360, 40);
  ntlhana(300, 180);
  feleletsaPopego(TSWALA);

  tlhalosa('Dipopego tse pedi tsa mothalo o o botala jwa loapi: e e ka fa molemeng e tlhoka letlhakore le le lengwe, e e ka fa mojeng ke khutlotharo e e feletseng.');
}

simololaPopego, ntlhana, TSWALA, feleletsaPhatlha