Skip to content
ExamplesOpen editor ↗

tsaya

→ pop()

Ends a drawing group, putting back the colours and transformations from before it.

tsaya()

tsaya is the second half of baya. Where baya puts your drawing state down, tsaya takes it back up — colours, stroke weight and every transformation return to what they were before the baya.

They are taught together because neither does anything alone. Read the baya page for everything the pair does, and for the examples.

A tsaya with no baya is an error. There is nothing to restore, so you are told.

Note: tsaya is the name of a drawing function only. lenaneo.pop() — taking the last item off a list — is not a Bopa word, and Bopa leaves it alone.

The pair that fences a transformation in
tiro setaLoeto() {
  thalaKanefase(400, 400);
  bokamorago(242);
  seeloSaSekhutlo(DEGREES);

  // mothalo o o dikologileng, o bofilwe ke baya/tsaya
  baya();
  sutisa(200, 160);
  dikolosa(35);
  tlatsaMmala(230, 140, 90);
  thalaKhutlonne(-80, -30, 160, 60);
  tsaya();

  // o mongwe o thadilwe morago ga tsaya — ga o a dikologa
  tlatsaMmala(110, 170, 220);
  thalaKhutlonne(120, 260, 160, 60);
}

baya, sutisa, dikolosa, godisa