EhhLang Help

Line

Creating a Line

You can create a line in Ehhlang using the line keyword. The line keyword is followed by the start and end positions of the line, thickness, and color of the line. For example, to create a line from position (100, 100) to position (200, 200) with thickness 5 and the white color, you can use the following code:

ehh { width: 840 height: 480 background: 0, 0, 0 output: "Line.png" } line { startPosition: 100, 100 endPosition: 200, 200 thickness: 5 color: 255, 255, 255 }

Output:

Line

In the above example, we have created a line from position (100, 100) to position (200, 200) with thickness 5 and the white color.

Properties

The line has the following properties:

  • startPosition: The start position of the line. The position is specified in the format X, Y.

  • endPosition: The end position of the line. The position is specified in the format X, Y.

  • thickness: The thickness of the line. The default thickness is 1.

  • color: The color of the line. The color is specified in RGB format R, G, B.

Conclusion

A line is a straight one-dimensional figure having no thickness and extending infinitely in both directions. You can create a line in Ehhlang using the line keyword and specify the start and end positions, thickness, and color of the line. This helps you to create images with different lines and colors.

Last modified: 25 February 2024