Skip to content
ExamplesOpen editor ↗

bayaMmaseke

Applies an alpha mask to an image.

bayaMmaseke(setshwantsho, mmaseke)

Mutates image transparency using another image’s alpha channel. Masks accumulate; applying one does not create a copy and cannot restore pixels hidden by a previous mask. The source mask is unchanged. Returns undefined.

NameTypeDescription
setshwantshosetshwantshoImage to mask.
mmasekesetshwantshoImage whose alpha channel supplies the mask.
Applies an alpha mask to an image
tiro setaLoeto() {
  thalaKanefase(320, 220);
  bokamorago(235);
  diri s = letela tlisaSetshwantsho("mokolwane.png");
  diri g = bopaBoalo(s.bophara, s.boleele);
  dirisaMoGo(g, tlatsaMmala, 255);
  dirisaMoGo(g, thalaSediko, s.bophara / 2, s.boleele / 2, s.bophara);
  diri mmaseke = dirisaMoGo(g, mmalaWaPhikisele);
  bayaMmaseke(s, mmaseke);
  thalaSetshwantsho(s, 80, 25, 160, 170);
  emisaPoapoeletso();
}

dirisaMoGo, tlisaSetshwantsho