tlatsaPhikisele
→ set()Paints a single dot of the canvas one colour.
tlatsaPhikisele(x, y, colour)tlatsaPhikisele(x, y, colour) puts a colour on a single dot. The word tlatsa is the one tlatsaMmala uses — to fill something with colour.
⚠ Nothing shows until you call
ntshwafatsaDiphikisele. This is what separatestlatsaPhikiselefromthalaNtlha, and it was measured: aftertlatsaPhikisele(5, 5, …),mmalaWaPhikisele(5, 5)still returns the old colour untilntshwafatsaDiphikiseleis called.
The difference from thalaNtlha: thalaNtlha obeys mothaloMmala, boketeMothalo and any sutisa/dikologa you have applied. tlatsaPhikisele obeys none of them — it writes to the dot directly.
A single number is a grey. tlatsaPhikisele(6, 6, 0) gives a black dot — measured: [0, 0, 0, 255].
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
x | palo | The x position of the dot. |
y | palo | The y position of the dot. |
mmala | mmala | A colour — bopaMmala(…), or a single number for a grey. |
Examples
Section titled “Examples”tiro setaLoeto() {
thalaKanefase(300, 160);
bokamorago(245);
gopheta (diri i = 0; i < 900; i = i + 1) {
diri x = paloEpe(0, 300);
diri y = paloEpe(0, 160);
tlatsaPhikisele(x, y, bopaMmala(paloEpe(0, 255), 90, 140));
}
ntshwafatsaDiphikisele();
tlhalosa('Dintlha tse dinnye tse di kgasitsweng mo kanefaseng ka mebala e e farologaneng.');
}See also
Section titled “See also”mmalaWaPhikisele, ntshwafatsaDiphikisele, balaDiphikisele, thalaNtlha