ENTRY | DOWNLOAD | MANUAL | ONGOING | |
TagTextTagText is a special Tag that draws pixel-exact text to the screen. It has several advantages over the text() and font() functions such as the transformation methods that can be called on tags and the resource savings that result from compiling the text to a display list. TagText can also be conveniently subclassed to create more specialized text tags.
TagText(parent, name, size, typeface)
<tagtext>.setText(text)
<tagtext>.setColor(r, g, b, a)
Relevant examples: tagtext.py , spritetext.py , text.py , ALL In Contextclass Atlantis(World): def onSetup(self): self.name = "Typo" tt= TagText(self, 'count', 21) tt.setText('You can read.') tt.setColor(1.0, 0.5, 0.5, 1.0) tt.moveBy(10, 20) |
|
Initiated by Stephan Hechenberger Thanks to CADRE's 103 |