Skip to content
ExamplesOpen editor ↗

thalaSediko

→ circle()

Draws a circle at the given centre, with the given diameter.

thalaSediko(x, y, bophara_jwa_go_ralala)

The first two arguments are the centre, and the third is the diameter — the distance from one side to the other, straight through the middle.

Only one size number, because a circle is equal all the way round. When you want a shape that is not — one lying down or standing up — use thalaSelee, which takes a width and a height separately.

seeloSaSediko controls how the numbers are read. The default is BOGARE; under SERIPAGARE the third number is half the diameter, which is the distance from the centre out to the edge.

NameTypeDescription
xpaloCentre x coordinate.
ypaloCentre y coordinate.
bophara_jwa_go_ralalapaloThe diameter — the distance across the circle through its centre.
A circle that follows the mouse
tiro setaLoeto() {
  thalaKanefase(400, 400);
}
tiro tshwantsha() {
  bokamorago(220);
  thalaSediko(pebaX, pebaY, 50);
}
Circles inside circles
tiro setaLoeto() {
  thalaKanefase(400, 400);
  bokamorago(22, 26, 42);
  tlogelaGoTlatsa();
  boketeMothalo(3);

  // palo e le nngwe fela ya bogolo e a fetoga — sediko se lekalekana ka metlha
  gopheta (diri i = 8; i > 0; i = i - 1) {
    mothaloMmala(60 + i * 22, 150, 240 - i * 16);
    thalaSediko(200, 200, i * 44);
  }
}

thalaSelee, thalaArc, seeloSaSediko, pebaX, pebaY