Skip to content
ExamplesOpen editor ↗

dirisaMoGo

Applies a supported operation to an image or graphics buffer.

dirisaMoGo(sengwe, tiroKgotsaBoleng, ...diparamethara)

Pass the receiver first and a supported keyword second, without quotes or parentheses. Remaining arguments belong to that operation. Preserves its native return value and mutation; some drawing and pixel operations return undefined, so do not assume chaining. dirisaMoGo(s, diphikisele) returns the live pixel array. Images support load/update pixels, get/set pixels, copy, filter and density. Graphics buffers additionally support the documented 2D drawing, style, text and transform operations. This is explicit dispatch; ordinary object methods are untouched. The second argument must be a registered operation name, not a string or a variable.

Image and graphics operations: balaDiphikisele, ntshwafatsaDiphikisele, mmalaWaPhikisele, tlatsaPhikisele, tlhotlha, kopololaDiphikisele, seeloSaDiphikisele.

Additional graphics operations: bokamorago, tlatsaMmala, tlogelaGoTlatsa, mothaloMmala, tlogelaMothalo, boketeMothalo, thalaMothalo, thalaNtlha, thalaSediko, thalaSelee, thalaKhutlonne, thalaSekwere, thalaTlhakorenne, thalaKhutlotharo, thalaArc, seeloSaSediko, seeloSaKhutlonne, ntlhaMothalo, kopanoMothalo, borethe, tlogelaBorethe, simololaPopego, feleletsaPopego, ntlhana, simololaPhatlha, feleletsaPhatlha, thalaBezier, ntlhanaBezier, ntlhanaKonego, seeloSaKonego, thalaMokwalo, bogoloJwaMokwalo, rulaganyaMokwalo, sebakaSaMela, mokgwaWaMokwalo, kgaoloMokwalo, mofutatlhaka, bopharaMokwalo, sutisa, dikolosa, godisa, sekamisaX, sekamisaY, baya, tsaya, tsenya, simololaGape, thalaSetshwantsho, seeloSaSetshwantsho, setshwantshoMmala, tlogelaSetshwantshoMmala, seeloSaMmala, seeloSaMotswako, phimola, seeloSaSekhutlo.

Readable properties: diphikisele, bophara, boleele.

DOM receivers also support pebaETobeditswe and pebaEKonyilwe with a callback (or maaka to remove it), and bopaMmala with no arguments on a colour picker. Event registration returns the receiver; colour access returns a colour object.

NameTypeDescription
sengwesetshwantsho / boalo / elementeThe image, graphics buffer or supported DOM receiver.
tiroKgotsaBolenglefokoA supported operation keyword, or diphikisele, bophara or boleele.
diparamethara (optional)bolengArguments for the selected operation; none when reading a property.
Applies a supported operation to an image or graphics buffer
tiro setaLoeto() {
  thalaKanefase(320, 220);
  bokamorago(235);
  diri g = bopaBoalo(180, 120);
  dirisaMoGo(g, bokamorago, 30, 130, 160);
  dirisaMoGo(g, tlogelaMothalo);
  dirisaMoGo(g, tlatsaMmala, 245);
  dirisaMoGo(g, thalaKhutlonne, 35, 25, 110, 70);
  thalaSetshwantsho(g, 70, 50);
  emisaPoapoeletso();
}

bopaBoalo, bopaSetshwantsho, balaDiphikisele, ntshwafatsaDiphikisele, diphikisele, mmalaWaPhikisele, tlatsaPhikisele, kopololaDiphikisele, tlhotlha, seeloSaDiphikisele