ntlhaMothalo
→ strokeCap()Sets the shape of the ends of a line.
ntlhaMothalo(mokgwa)A thick line does not simply stop — its end has a shape. There are three modes:
KGOLOKWE— the end is rounded, as though a dot were set down at the tip. This is the default.SEPHAPHATHI— the end is cut off flat, exactly at the point you gave.FETA— the end is flat again, but it runs past the point by half the stroke weight.
The difference between SEPHAPHATHI and FETA shows only on a thick line: SEPHAPHATHI stops at the point, FETA goes beyond it.
Use boketeMothalo to make the line thicker, or there is nothing to see.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
mokgwa | tlhomameng | KGOLOKWE, SEPHAPHATHI or FETA. |
Examples
Section titled “Examples”tiro setaLoeto() {
thalaKanefase(400, 400);
bokamorago(240);
boketeMothalo(40);
mothaloMmala(70, 120, 200);
// mela e mesetlha e bontsha dintlha tse tharo tse di neilweng —
// ela tlhoko kwa mothalo o o mokote o khutlang gona go bapisiwa le tsona
ntlhaMothalo(KGOLOKWE);
thalaMothalo(120, 110, 280, 110);
ntlhaMothalo(SEPHAPHATHI);
thalaMothalo(120, 200, 280, 200);
ntlhaMothalo(FETA);
thalaMothalo(120, 290, 280, 290);
boketeMothalo(1);
mothaloMmala(220, 60, 60);
thalaMothalo(120, 60, 120, 340);
thalaMothalo(280, 60, 280, 340);
}