Skip to content
ExamplesOpen editor ↗

simololaGape

→ resetMatrix()

Clears every transformation, putting (0, 0) back at the top-left corner.

simololaGape()

If you have used sutisa, dikolosa, godisa or sekamisaX and want to start over, simololaGape clears them all at once. Afterwards (0, 0) is back at the top-left corner and there is no slant or accumulation of any kind.

What separates simololaGape from tsaya: tsaya puts the state back to what it was when baya was called — which may still have transformations in it. simololaGape wipes everything, wherever it came from.

In most sketches baya and tsaya are what you want: they fence a transformation into one place rather than clearing the whole world.

Wiping accumulated transformations
tiro setaLoeto() {
  thalaKanefase(400, 400);
  bokamorago(240);
  tlogelaMothalo();

  // dikgolokwe tse tharo, sutisa nngwe le nngwe e okeletsa e nngwe
  gopheta (diri i = 0; i < 3; i = i + 1) {
    sutisa(90, 70);
    tlatsaMmala(210, 130 + i * 30, 90);
    thalaSediko(0, 0, 60);
  }

  // simololaGape e phimola tse tharo tsotlhe ka nako e le nngwe
  simololaGape();

  // ka jalo e e latelang e thadiwa go tswa mo sekhutlong sa godimo-molema gape
  tlatsaMmala(90, 160, 220);
  thalaSediko(330, 330, 60);
}

tsenya, baya, tsaya, sutisa