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.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
setshwantsho | setshwantsho | Image to mask. |
mmaseke | setshwantsho | Image whose alpha channel supplies the mask. |
Examples
Section titled “Examples”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();
}