bogoloJwaMokwalo
→ textSize()Sets the size of drawn text, in pixels.
bogoloJwaMokwalo(size) | bogoloJwaMokwalo()The default size is 12. What you set here affects every later thalaMokwalo, and the number bopharaMokwalo reports.
It also affects the gap between lines. Left alone, sebakaSaMela is 1.275 times whatever size you set.
⚠ One oddity worth knowing. Before you call bogoloJwaMokwalo at all, sebakaSaMela() returns 15 — a starting value set once. Call bogoloJwaMokwalo(12) — the very size that was already in force — and it becomes 15.3, because it is now computed as 12 × 1.275. That is measured.
Once you set sebakaSaMela yourself, the size no longer changes it.
Calling bogoloJwaMokwalo() with no number returns the size currently in force.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
bogolo (optional) | palo | The text size in pixels. |
Examples
Section titled “Examples”tiro setaLoeto() {
thalaKanefase(400, 260);
bokamorago(240);
tlogelaMothalo();
tlatsaMmala(40, 60, 90);
diri y = 40;
gopheta (diri i = 0; i < 5; i = i + 1) {
diri b = 10 + i * 9;
bogoloJwaMokwalo(b);
thalaMokwalo('Bopa', 30, y);
y = y + b + 14;
}
tlhalosa('Lefoko "Bopa" le kwadilwe gatlhano, ka bogolo jo bo golang mo go tswang kwa godimo go ya kwa tlase.');
}