Text
Creating Text
You can create text in Ehhlang using the text
keyword. The text
keyword is followed by the text content and the position of the text. For example, to create a text with the content "Hello, World!" at position (100, 100) with the white color, you can use the following code:
Output:
In the above example, we have created a text with the content "Hello Ehh!!!" at position (100, 100) with the white color. We have also specified the font scale and thickness.
Properties
The text has the following properties:
fontScale
: The font scale of the text.thickness
: The thickness of the text.color
: The color of the text. The color is specified in RGB formatR, G, B
.position
: The position of the text on the canvas in formatX, Y
.text
: The content of the text.
Conclusion
Text is a fundamental part of any programming language. You can create text in Ehhlang using the text
keyword and specify the font scale, thickness, color, position, and content of the text. This helps you to create images with different text and styles.