EhhLang Help

PolyLines

Creating a PolyLine

You can create a PolyLine by using the polylines keyword. The polylines keyword is followed by the positions of the points that make up the PolyLine. For example, to create a polyline with 4 points, you would use the following code:

ehh { width: 1920 height: 1080 background: 0, 0, 0 output: "PolyLinesExample.png" } polyLines { color: 255, 255, 255 thickness: 4 position [0]: 50, 300 position [1]: 200, 50 position [2]: 350, 350 position [3]: 400, 600 fillColor: 255, 0, 0 }

Output:

PolyLinesExample

In above example, we have created a PolyLine with 4 points. The color keyword is used to set the color of the PolyLine. The thickness keyword is used to set the thickness of the PolyLine. The fillColor keyword is used to set the color of the points that make up the PolyLine.

Properties

The following properties can be used to customize the appearance of a PolyLine:

  • color: The color of the PolyLine.

  • thickness: The thickness of the PolyLine.

  • position: The positions of the points that make up the PolyLine. The position property in polyLines will be in the array format. For example, position [0]: 50, 300.

  • fillColor: The color of the points that make up the PolyLine. It can be set to no if it is inherited from a poly-line that has fill color and the current object doesn't want to inherit it.

Conclusion

PolyLines are a useful tool for representing paths on a map. They can be used to represent routes, boundaries, and other linear features. By using the polylines keyword, you can create PolyLines with different colors, thicknesses, and point colors.

Last modified: 25 February 2024