Skip to content
ExamplesOpen editor ↗

bopaSetshwantsho

→ createImage()

Creates a transparent image.

bopaSetshwantsho(bopharaJwaSone, boleeleJwaSone)

Returns a new transparent image with the requested width and height. Display it with thalaSetshwantsho. Use dirisaMoGo with the pixel operations to edit its buffer. Image density starts at 1 independently of the canvas density.

NameTypeDescription
bopharaJwaSonepaloWidth in pixels.
boleeleJwaSonepaloHeight in pixels.
Creates a transparent image
tiro setaLoeto() {
  thalaKanefase(320, 220);
  bokamorago(235);
  diri s = bopaSetshwantsho(1, 1);
  dirisaMoGo(s, balaDiphikisele);
  dirisaMoGo(s, tlatsaPhikisele, 0, 0, [20, 150, 170, 255]);
  dirisaMoGo(s, ntshwafatsaDiphikisele);
  thalaSetshwantsho(s, 70, 50, 180, 120);
  emisaPoapoeletso();
}

dirisaMoGo, thalaSetshwantsho, tlisaSetshwantsho