Skip to content
ExamplesOpen editor ↗

seeloSaKhutlonne

→ rectMode()

Sets how the numbers given to `thalaKhutlonne` and `thalaSekwere` are read.

seeloSaKhutlonne(mokgwa)

By default the first two numbers are the top-left corner, followed by the width and height. That is seeloSaKhutlonne(SEKHUTLO) — and note it differs from seeloSaSediko, which starts at the centre.

Three other modes: DIKHUTLO (two opposite corners), BOGARE (centre, then width and height) and SERIPAGARE (centre, then half the width and height).

DIKHUTLO and thalaSekwere do not get along. That mode is meant for thalaKhutlonne alone; what actually happens is that the square still uses it, and draws something that is not a square. See the thalaSekwere page.

Call seeloSaKhutlonne() with nothing to read back the current mode. An unrecognised word is silently ignored.

NameTypeDescription
mokgwatlhomamengSEKHUTLO, DIKHUTLO, BOGARE or SERIPAGARE.
BOGARE makes rectangles share a centre
tiro setaLoeto() {
  thalaKanefase(400, 400);
  bokamorago(238);
  tlogelaMothalo();

  // ka SEKHUTLO dikhutlonne tse di golang di ka bo di ile ka fa tlase-ntsheng;
  // ka BOGARE di gola go tswa mo bogareng go ya kwa ntle
  seeloSaKhutlonne(BOGARE);

  gopheta (diri i = 6; i > 0; i = i - 1) {
    metlha bogolo = i * 50;
    tlatsaMmala(40 + i * 30, 80 + i * 20, 200 - i * 20);
    thalaKhutlonne(200, 200, bogolo, bogolo);
  }
}

thalaKhutlonne, thalaSekwere, seeloSaSediko